Moving picture coding device, moving picture coding method and moving picture coding program, and moving picture decoding device, moving picture decoding method and moving picture decoding program

ABSTRACT

A temporal merging motion information candidate generation unit derives, when information indicating whether or not to derive a temporal merging motion information candidate shared for all prediction blocks in a coding block is information indicating the derivation of a temporal merging motion information candidate shared for all the prediction blocks in the coding block, a temporal merging motion information candidate shared for all the prediction blocks in the coding block from a prediction block of a coded picture different from a picture having a prediction block subject to coding. A merging motion information candidate list construction unit generates a plurality of merging motion information candidates including a temporal merging motion information candidate.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a Continuation of U.S. Ser. No. 16/878,116, filedMay 19, 2020; which is a Continuation of U.S. Ser. No. 15/184,502, filedJun. 16, 2016, now U.S. Pat. No. 10,701,389, issued Jun. 30, 2020; whichis a Divisional of U.S. patent application Ser. No. 14/299,732, filedJun. 9, 2014, now abandoned; which is a Continuation of PCTInternational Application No. PCT/JP2012/008427, filed Dec. 28, 2012,which claims the benefit of Japanese Patent Application Nos. 2011-288982and 2011-288983, filed Dec. 28, 2011, and 2012-285808 and 2012-285809,filed Dec. 27, 2012.

BACKGROUND 1. Field of the Invention

The present invention relates to a technology of coding and decodingmoving pictures by using motion compensation prediction and, moreparticularly, to a moving picture coding device, a moving picture codingmethod and a moving picture coding program, and a moving picturedecoding device, a moving picture decoding method and a moving picturedecoding program that code and decode motion information used in motioncompensation prediction.

2. Description of the Related Art

Motion compensation prediction is used in commonly-used moving-picturecompression coding. Motion compensation prediction is a technology ofpartitioning a target picture into small blocks and generating, as aprediction signal, a signal located a position moved from a target blockof the target picture to a reference block of a reference picture basedon the amount of motion indicated by a motion vector, the referencepicture being a decoded picture. Motion compensation prediction includesuni-prediction performed using a single motion vector and bi-predictionperformed using two motion vectors.

Regarding motion vectors, a motion vector of a coded block neighboring atarget block is set to be a motion vector predictor (also simplyreferred to as “vector predictor”), and a difference between a motionvector of the target block and the vector predictor is obtained andtransmitted as a coding vector so as to improve compression efficiency.

Moving-picture compression coding such as MPEG-4AVC/H.264 (hereinafter,MPEG-4AVC) allows for highly-accurate motion compensation prediction bymaking the size of a block used for motion compensation to be small withvariations. On the other hand, there is a problem that the code size ofa coding vector becomes large when reducing the size of the block.

Thus, in MPEG-4AVC, the continuity of motion in a temporal direction isfocused, and motion compensation prediction in a temporal direct mode isused where motion compensation is achieved, without transmitting codingvectors, by scaling a motion vector of a block on a reference picturethat is located at the same position as a target block according to aninter-frame distance and using the scaled motion vector as a motionvector of the target block, the reference picture being a processedpicture different from a target picture on which the target block islocated. This allows for a reduction in a code size of a motion vector,achieving improvement in coding efficiency.

Also, focusing on the continuity of motion in a spatial direction,Patent document 1 discloses a method of achieving motion compensationprediction, without transmitting coding vectors, by using a motionvector of a processed block neighboring a target block as a motionvector of the processed block.

[Patent document 1] JP 10-276439

In the derivation of a motion vector in a temporal direction such asthat defined in the above-stated MPEG-4AV, scaling is required at thetime of the derivation, and complicated operations thus becomenecessary. In the method described in Patent document 1, a motion vectorof a processed block neighboring a target prediction block is used as amotion vector of the target prediction block, and in the case ofperforming motion compensation prediction collectively on a plurality ofneighboring prediction blocks, a parallel motion prediction process maynot be performed.

SUMMARY

Accordingly, a purpose of the present invention is to provide a movingpicture coding and moving picture decoding technology capable ofefficiently achieving parallel processing of motion compensationprediction that performs motion compensation prediction collectively ona plurality of neighboring prediction blocks while using a motion vectorof a processed block neighboring a target prediction block in thegeneration of a motion block of the target prediction block.

A picture coding device according to one embodiment of the presentinvention includes: a temporal merging motion information candidategeneration unit (161) configured to derive, when information indicatingwhether or not to derive a temporal merging motion information candidateshared for all prediction blocks in the coding block is informationindicating the derivation of a temporal merging motion informationcandidate shared for all the prediction blocks in the coding block, atemporal merging motion information candidate shared for all theprediction blocks in the coding block from a prediction block of a codedpicture different from a picture having a prediction block subject tocoding; a merging motion information candidate generation unitconfigured to generate a plurality of merging motion informationcandidates including the temporal merging motion information candidate;a merging motion information selection unit (141) configured to selectone merging motion information candidate from the plurality of mergingmotion information candidates and to use the selected merging motioninformation candidate as motion information of the prediction blocksubject to coding; and a coding unit configured to code an index forspecifying the selected merging motion information candidate as acandidate specifying index.

Another embodiment of the present invention also relates to a movingpicture coding device. The device is a moving picture coding deviceadapted to partition a coding block into a plurality of predictionblocks and perform motion compensation, including: a temporal mergingmotion information candidate generation unit (161) configured togenerate a temporal merging motion information candidate shared in anyone of prediction blocks in the coding block from a block of a codedpicture different from a picture having a prediction block subject tocoding; a merging motion information candidate generation unitconfigured to generate a plurality of merging motion informationcandidates including the temporal merging motion information candidate;a merging motion information selection unit (141) configured to selectone merging motion information candidate from the plurality of mergingmotion information candidates and to set the selected merging motioninformation candidate to be motion information of the prediction blocksubject to coding; and a coding unit configured to code an index forspecifying the selected merging motion information candidate as acandidate specifying index.

Yet another embodiment of the present invention relates to a picturecoding method. This method is a moving picture coding method for codinga coding block consisting of greater than or equal to one predictionblock, including: deriving, when information indicating whether or notto derive a temporal merging motion information candidate shared for allprediction blocks in the coding block is information indicating thederivation of a temporal merging motion information candidate shared forall the prediction blocks in the coding block, a temporal merging motioninformation candidate shared for all the prediction blocks in the codingblock from a prediction block of a coded picture different from apicture having a prediction block subject to coding; generating aplurality of merging motion information candidates including thetemporal merging motion information candidate; selecting one mergingmotion information candidate from the plurality of merging motioninformation candidates and using the selected merging motion informationcandidate as motion information of the prediction block subject tocoding; and coding an index for specifying the selected merging motioninformation candidate as a candidate specifying index.

A moving picture decoding device according to one embodiment of thepresent invention is a moving picture decoding device adapted to decodea decoding block consisting of greater than or equal to one predictionblock, including: a decoding unit configured to decode, from a bitstreamin which an index for specifying a merging motion information candidateused in a prediction block subject to decoding is coded as a candidatespecifying index, the candidate specifying index; a temporal mergingmotion information candidate generation unit (161) configured to derive,when information indicating whether or not to derive a temporal mergingmotion information candidate shared for all prediction blocks in thedecoding block is information indicating the derivation of a temporalmerging motion information candidate shared for all the predictionblocks in the decoding block, a temporal merging motion informationcandidate shared for all the prediction blocks in the decoding blockfrom a prediction block of a decoded picture different from a picturehaving a prediction block subject to decoding; a merging motioninformation candidate generation unit configured to generate a pluralityof merging motion information candidates including the temporal mergingmotion information candidate; and a merging motion information selectionunit (231) configured to select one merging motion information candidatefrom the plurality of merging motion information candidates based on thecandidate specifying index and to use the selected merging motioninformation candidate as motion information of the prediction blocksubject to decoding.

Another embodiment of the present invention also relates to a movingpicture decoding device. This device is a moving picture decoding deviceadapted to partition a decoding block into a plurality of predictionblocks and perform motion compensation, including: a decoding unitconfigured to decode, from a bit stream in which an index for specifyinga merging motion information candidate used in a prediction blocksubject to decoding is coded as a candidate specifying index, thecandidate specifying index; a temporal merging motion informationcandidate generation unit (161) configured to generate a temporalmerging motion information candidate shared in any one of predictionblocks in the coding block from a block of a decoded picture differentfrom a picture having a prediction block subject to decoding; a mergingmotion information candidate generation unit configured to generate aplurality of merging motion information candidates including thetemporal merging motion information candidate; and a merging motioninformation selection unit (231) configured to select one merging motioninformation candidate from the plurality of merging motion informationcandidates based on the candidate specifying index and to set theselected merging motion information candidate to be motion informationof the prediction block subject to decoding.

Another embodiment of the present invention relates to a moving imagedecoding method. This method is a moving picture decoding method fordecoding a decoding block consisting of greater than or equal to oneprediction block, including: decoding, from a bitstream in which anindex for specifying a merging motion information candidate used in aprediction block subject to decoding is coded as a candidate specifyingindex, the candidate specifying index; deriving, when informationindicating whether or not to derive a temporal merging motioninformation candidate shared for all prediction blocks in the decodingblock is information indicating the derivation of a temporal mergingmotion information candidate shared for all the prediction blocks in thedecoding block, a temporal merging motion information candidate sharedfor all the prediction blocks in the decoding block from a predictionblock of a decoded picture different from a picture having a predictionblock subject to decoding; a merging motion information candidategeneration module configured to generate a plurality of merging motioninformation candidates including the temporal merging motion informationcandidate; and selecting one merging motion information candidate fromthe plurality of merging motion information candidates based on thecandidate specifying index and using the selected merging motioninformation candidate as motion information of the prediction blocksubject to decoding.

Optional combinations of the aforementioned constituting elements andimplementations of the invention in the form of methods, apparatuses,systems, recording mediums, and computer programs may also be practicedas additional modes of the present invention.

BRIEF DESCRIPTION OF THE DRAWINGS

Embodiments will now be described, by way of example only, withreference to the accompanying drawings which are meant to be exemplary,not limiting, and wherein like elements are numbered alike in severalFigures, in which:

FIGS. 1A and 1B are diagrams showing coding blocks;

FIGS. 2A through 2D are diagrams explaining prediction block size types;

FIG. 3 is a diagram explaining prediction block size types;

FIG. 4 is a diagram explaining prediction coding modes;

FIG. 5 is a diagram explaining relationships between merge indices andbitstreams;

FIG. 6 is a diagram explaining an example of syntax of a predictionblock;

FIG. 7 is a diagram showing the configuration of a moving picture codingdevice according to a first embodiment;

FIG. 8 is a diagram showing the configuration of a motion informationgeneration unit shown in FIG. 7;

FIG. 9 is a diagram explaining the configuration of a merge modedetermination unit shown in FIG. 8;

FIG. 10 is a diagram explaining the configuration of a merging motioninformation candidate list construction unit shown in FIG. 9;

FIG. 11 is a flowchart explaining the operation of the merging motioninformation candidate list construction unit shown in FIG. 9;

FIG. 12 is a diagram explaining a candidate block group of a predictionblock having a prediction block size type of 2N.times.2N;

FIGS. 13A-13H are diagrams showing a candidate block group occurringwhen a positional relationship that is the same as that of a predictionblock of a coding block that has a prediction block size type of2N.times.2N is applied to a prediction block in a coding block that doesnot have a prediction block size type of 2N.times.2N;

FIGS. 14A-14H are diagrams explaining an example of a positionalrelationship between a prediction block having a prediction block sizetype other than 2N.times.2N and a spatial candidate block group in thefirst embodiment;

FIG. 15 is a flowchart explaining the operation of a spatial mergingmotion information candidate generation unit shown in FIG. 10;

FIG. 16 is a flowchart explaining the operation of a temporal mergingmotion information candidate generation unit shown in FIG. 10;

FIG. 17 is a flowchart explaining the operation of a first mergingmotion information candidate supplying unit shown in FIG. 10;

FIG. 18 is a diagram explaining relationships among the number ofcombination checks, a merging motion information candidate M, and amerging motion information candidate N;

FIG. 19 is a flowchart explaining the operation of a second mergingmotion information candidate supplying unit shown in FIG. 10;

FIG. 20 is a diagram showing the configuration of a moving picturedecoding device according to the first embodiment;

FIG. 21 is a diagram showing the configuration of a motion informationreproduction unit shown in FIG. 20;

FIG. 22 is a diagram showing the configuration of a merging motioninformation reproduction unit shown in FIG. 21;

FIGS. 23A-23H are diagrams explaining a positional relationship betweena prediction block having a prediction block size type other than2N.times.2N and a spatial candidate block group in a second embodiment;

FIGS. 24A-24H are diagrams explaining a positional relationship betweena prediction block having a prediction block size type other than2N.times.2N and a spatial candidate block group in an example where acandidate block of a prediction block in a coding block is sharedwithout depending on a prediction block size type;

FIGS. 25A-25H are diagrams explaining a positional relationship betweena prediction block having a prediction block size type other than2N.times.2N and a spatial candidate block group in a third embodiment;

FIG. 26 is a flowchart explaining the operation of a merging motioninformation candidate list construction unit according to the thirdembodiment;

FIG. 27 is a diagram explaining a maximum coding block lower limit lineand a temporal candidate block group;

FIGS. 28A-28H are diagrams explaining a positional relationship betweena prediction block having a prediction block size type other than2N.times.2N and a spatial candidate block group in a fourth embodiment;

FIG. 29 is a diagram explaining the configuration of a merging motioninformation candidate list construction unit according to the fourthembodiment;

FIG. 30 is a flowchart explaining the operation of the merging motioninformation candidate list construction unit according to the fourthembodiment;

FIG. 31 is a diagram explaining the configuration of a merging motioninformation candidate list construction unit according to a fifthembodiment;

FIG. 32 is a flowchart explaining the operation of the merging motioninformation candidate list construction unit according to the fifthembodiment;

FIG. 33 shows the configuration of a vector predictor mode determinationunit;

FIG. 34 is a diagram explaining the configuration of a vector predictorcandidate list construction unit;

FIG. 35 is a flowchart explaining the operation of the vector predictorcandidate list construction unit; and

FIG. 36 is a diagram explaining the configuration of a motion vectorreproduction unit.

DETAILED DESCRIPTION

The invention will now be described by reference to the preferredembodiments. This does not intend to limit the scope of the presentinvention, but to exemplify the invention.

First, an explanation is first given of a technology on whichembodiments of the present invention are based.

Currently, devices and systems complying with a coding system such asMPEG (Moving Picture Experts Group) or the like have become widely used.In such a coding system, a plurality of pictures that are continuous ona time axis are treated as digital signal information. In that case, forthe purpose of highly efficient broadcasting, transmission,accumulation, and the like of information, compression coding isperformed using motion compensation prediction where a picture ispartitioned into a plurality of blocks and redundancy in a temporaldirection is used and using orthogonal transformation such as discretecosine transform where redundancy in a spatial direction is used.

In 2003, by cooperative work of Joint Technical Committee (ISO/IEC) ofthe International Organization for Standardization (ISO) and theInternational Electrotechnical Commission (IEC) and the InternationalTelecommunication Union Telecommunication Standardization Sector(ITU-T), a coding system called MPEG-4 AVC/H.264 (a standard number of14496-10 is assigned in ISO/IEC and a standard number of H.264 isassigned in ITU-I, and this system is hereinafter referred to asMPEG-4AVC) was established as a global standard. In MPEG-4AVC, a medianvalue of respective motion vectors of a plurality of neighboring blocksof a target block is basically set to be a vector predictor. If the sizeof a prediction block is not square and a reference index of a specificneighboring block of a target block is the same as a reference index ofthe target block, a motion vector of the specific neighboring block isset to be a vector predictor.

Currently, by cooperative work of Joint Technical Committee (ISO/IEC) ofthe International Organization for Standardization (ISO) and theInternational Electrotechnical Commission (IEC) and the InternationalTelecommunication Union Telecommunication Standardization Sector(ITU-T), the standardization of a coding system called HEVC is underconsideration.

In the standardization of HEVC, a merge mode is under considerationwhere a single candidate block is selected from a candidate block groupcomposed of candidate blocks, which are a plurality of neighboringblocks and blocks of another picture that is decoded, so thatinformation of the selected candidate block is coded and decoded.

First Embodiment

(Coding Block)

In the present embodiment, a picture signal that has been input ispartitioned in units of maximum coding blocks, and maximum coding blocksthat have been partitioned are processed in raster scan order. A codingblock has a hierarchical structure, and smaller coding blocks can beobtained by quartering the coding block sequentially in consideration ofcoding efficiency and the like. Quartered coding blocks are coded inzigzag scanning order. Minimum coding blocks that cannot be made anysmaller are referred to as minimum coding blocks. Coding blocksrepresent coding units. If the number of partition occurrences is zeroin a maximum coding block, the maximum coding block also represents acoding block. In the present embodiment, a maximum coding blockrepresents 64 pixels.times.64 pixels, and a minimum coding blockrepresents 8 pixels.times.8 pixels.

FIGS. 1A and 1B are diagrams for explaining coding blocks. In an exampleshown in FIG. 1A, a coding block is partitioned into ten pieces. CU0,CU1, and CU9 represent coding blocks of 32 pixels.times.32 pixels, CU2,CU3, and CU8 represent coding blocks of 16 pixels.times.16 pixels, andCU4, CU5, CU6, and CU7 represent coding blocks of 8 pixels.times.8pixels. In an example shown in FIG. 1B, a coding block is partitionedinto one piece.

(Prediction Block)

In the present embodiment, a coding block is further partitioned intoprediction blocks (also referred to as partitions). A coding block ispartitioned into greater than or equal to one prediction block accordingto a prediction block size type (also referred to as “partitioning type”or partition type). FIGS. 2A through 2D are diagrams for explainingprediction block size types. FIG. 2A shows 2N.times.2N where a codingblock is not partitioned. FIG. 2B shows 2N.times.N where a coding blockis halved in a horizontal direction. FIG. 2C shows N.times.2N where acoding block is halved in a vertical direction. FIG. 2D shows N.times.Nwhere a coding block is quartered in a horizontal and in a verticaldirection. 2N.times.2N consists of a single prediction block 0. Both2N.times.N and N.times.2N each consist of two prediction blocks: aprediction block 0 and a prediction block 1. N.times.N consists of fourprediction blocks: a prediction block 0, a prediction block 1, aprediction block 2, and a prediction block 3. Coding is performed inorder of a prediction block 0, a prediction block 1, a prediction block2, and a prediction block 3.

FIG. 3 is a diagram for explaining prediction block sizes according tothe number of partition occurrences of a coding block and predictionblock size types. For prediction block sizes in the present embodiment,there are 13 prediction block sizes from 64 pixels.times.64 pixels,where the number of CU partition occurrences is 0 and a prediction blocksize type is 2N.times.2N, to 4 pixels.times.4 pixels, where the numberof CU partition occurrences is 3 and a prediction block size type isN.times.N. For example, a coding block can be halved in a horizontal ora vertical direction in an asymmetric manner.

In the present embodiment, a maximum coding block represents 64pixels.times.64 pixels, and a minimum coding block represents 8pixels.times.8 pixels. However, the maximum coding block and the minimumcoding block are not limited to this combination. Partition patterns ofa prediction block are shown to be those of FIGS. 2A through 2D.However, the partition patterns are not limited to this as long as thepartition patterns are a combination of patterns where a predictionblock is partitioned into greater than or equal to one piece.

(Prediction coding mode) In the present embodiment, motion compensationprediction and the number of coding vectors can be changed for eachprediction block. An explanation is now given using FIG. 4 regarding anexample of a prediction coding mode with which motion compensationprediction and the number of coding vectors are associated. FIG. 4 is adiagram for explaining prediction coding modes.

Prediction coding modes shown in FIG. 4 include PredL0 where aprediction direction of motion compensation prediction is uni-prediction(L0 prediction) and the number of coding vectors is 1, Pred1 where aprediction direction of motion compensation prediction is uni-prediction(L1 prediction) and the number of coding vectors is 1, PredBI where aprediction direction of motion compensation prediction is bi-prediction(BI prediction) and the number of coding vectors is 2, and a merge mode(MERGE) where a prediction direction of motion compensation predictionis uni-prediction (L0 prediction/1 prediction) or bi-prediction (BIprediction) and the number of coding vectors is 0. There is also anintra mode (Intra), which is a prediction coding mode where motioncompensation prediction is not performed. In these modes, PredL0, Pred1,and PredBI are vector predictor modes.

In the merge mode, a prediction direction can be any one of L0prediction, L1 prediction, and BI prediction. This is because theprediction direction of a candidate block selected from a candidateblock group is passed on without any change as the prediction directionof the merge mode, or the prediction direction of the merge mode isderived from decoded information. Also, a coding vector is not coded inthe merge mode. This is because a motion vector of a candidate blockselected from a candidate block group is passed on without any change asa coding vector of the merge mode, or the coding vector of the mergemode is derived by a predetermined rule.

(Reference Index)

The present embodiment allows an optimum reference picture to beselected from a plurality of reference pictures in motion compensationprediction for the improvement of the accuracy of the motioncompensation prediction. Therefore, a reference picture used in themotion compensation prediction is coded along with a coding vector as areference picture index. A reference picture index used in the motioncompensation prediction has a numerical value of larger than or equal to0. If the motion compensation prediction is uni-prediction, onereference index is used. If the motion compensation prediction isbi-prediction, two reference indices are used (FIG. 4).

A reference index is not coded in the merge mode. This is because areference index of a candidate block selected from a candidate blockgroup is passed on without any change as a reference index of the mergemode, or the reference index of the merge mode is derived by apredetermined rule.

(Reference Index List)

In the present embodiment, greater than or equal to one referencepicture that can be used in motion compensation prediction is added in areference index list in advance, and, by indicating a reference pictureadded in the reference index list by a reference index, the referencepicture is determined and used in the motion compensation prediction.The types of reference index lists include a reference index list L0(also referred to as a reference index list of L0 prediction) and areference index list L1 (also referred to as a reference index list ofL1 prediction). If the motion compensation prediction is uni-prediction,either L0 prediction where a reference picture in the reference indexlist L0 is used or L1 prediction where a reference picture in thereference index list L1 is used is used. If the motion compensationprediction is bi-prediction, BI prediction where both the referenceindex list L0 and the reference index list L1 are used is used. Themaximum number of reference pictures that can be added in each referenceindex list is set to be 16.

(Merge Index)

In the case of a merge mode in the present embodiment, by using, as acandidate block group, a plurality of neighboring blocks in a targetpicture and blocks in and around a same-position prediction blocklocated at the same position as a target prediction block in anotherpicture that is decoded, a candidate block having an optimum predictioncoding mode, motion vector, and reference index is selected from thecandidate block group so as to code and decode a merge index forindicating the selected candidate block. One merge index is used onlyduring the merge mode (FIG. 4). The maximum number of merge indices(also referred to as the maximum number of merge candidates) is 5, and amerge index is an integer of 0 to 4. The maximum number of merge indicesis set to be 5 in this case. However, the maximum number of mergeindices is not limited to this as long as the maximum number of mergeindices is greater or equal to 2.

Hereinafter, motion information of a candidate block subject to a mergeindex is referred to as a merging motion information candidate, and acollection of merging motion information candidates is referred to as amerging motion information candidate list. Hereinafter, motioninformation includes a prediction direction, a motion vector, and areference index.

An explanation is now given regarding relationships between mergeindices and bitstreams. FIG. 5 is a diagram for explaining relationshipsbetween merge indices and bitstreams. If a merge index is 0, a bitstreamis “0”. If a merge index is 1, a bitstream is “10”. If a merge index is2, a bitstream is “110”. If a merge index is 3, a bitstream is “1110”.If a merge index is 4, a bitstream is “1111”. Thus, the merge indicesand the bitstreams are set such that the respective bitstreams becomelonger as the merge indices become larger. Therefore, by assigning asmall marge index to a candidate block with high selectivity, the codingefficiency can be improved.

An explanation is now given regarding relationships between a mergingmotion information candidate list and merge indices. A merge index 0represents a first (0-th) merging motion information candidate of amerging motion information candidate list. Hereinafter, a merge index mrepresents an m-th merging motion information candidate of the mergingmotion information candidate list, where m is an integer of 0 to[(maximum number of merge candidates)−1].

(Vector Predictor Index)

In order to improve the accuracy of a vector predictor in the presentembodiment, by using, as a candidate block group, a plurality ofneighboring blocks in a target picture and blocks in and around asame-position prediction block located at the same position as a targetprediction block in another picture that is decoded, a candidate blockhaving an optimum motion vector as a vector predictor is selected fromthe candidate block group so as to code and decode a vector predictorindex for indicating the selected candidate block. If the motioncompensation prediction is uni-prediction, one vector predictor index isused. If the motion compensation prediction is bi-prediction, two vectorpredictor indices are used (FIG. 4). The maximum number of vectorpredictor indices (also referred to as the maximum number of vectorpredictor candidates) is 2, and a vector predictor index is an integerof 0 or 1. The maximum number of vector predictor indices is set to be 2in this case. However, the maximum number of vector predictor indices isnot limited to this as long as the maximum number of vector predictorindices is greater than or equal to 2.

An explanation is now given regarding relationships between vectorpredictor indices and bitstreams. A bitstream of a vector predictorindex is “0” when the vector predictor index is 0, and a bitstream of avector predictor index is “1” when the vector predictor index is 1. Ifthe maximum number of vector predictor candidates is greater than orequal to 3, bitstreams can be assigned in a rule similar to that of amerge index (a bitstream becomes longer as an index becomes larger).

Hereinafter, a motion vector of a candidate block subject to a vectorpredictor index is referred to as a vector predictor candidate, and acollection of vector predictor candidates is referred to as a vectorpredictor candidate list.

(Syntax)

An explanation is given regarding an example of syntax of a predictionblock according to the present embodiment. FIG. 6 is a diagramexplaining syntax according to the present embodiment. FIG. 6 shows anexample of a syntax structure of a coding tree (Coding Tree), a codingblock (Coding Unit), and a prediction block (prediction Unit). In thecoding tree, partition information of the coding block is managed. Inthe coding tree, split_coding_unit_flag is set. If thesplit_coding_unit_flag is 1, the coding tree is partitioned into fourcoding trees. If the split_coding_unit_flag is 0, the coding treerepresents a coding block (Coding Unit). In the coding block, a skipmode flag (skip_flag), a prediction mode (pred_mode), and a predictionblock size type (part_mode) are set. The coding block is partitionedinto one, two, or four prediction blocks according to the skip mode flagand the prediction block size type. The prediction mode shows whetherthe coding block is a coding block on which intra prediction isperformed or a coding block on which inter prediction (motioncompensation prediction) is performed. If the skip mode flag is 1, askip mode is implemented. There exists one prediction block in the skipmode. The number of partition occurrences of a coding block is alsoreferred to as a depth of the coding block (coding tree).

Set in the prediction block are a merge flag (merge_flag), a merge index(merge_idx), an inter prediction type (inter_pred_type), a referenceindex of the L0 prediction (ref_idx_|0), a vector difference of the L0prediction (mvd_|0[0], mvd_|0[1]), a vector predictor index of the L0prediction (mvp_idx_|0), a reference index of the L1 prediction(ref_idx_|1), a vector difference of the L1 prediction (mvd_|1[0],mvd_|1[1]), and a vector predictor index of the L1 prediction(mvp_idx_|1). In the vector difference, [0] represents a horizontalcomponent, and [1] represents a vertical component.

In this case, inter_pred_type shows a prediction direction of motioncompensation prediction (also referred to as an inter prediction type)and includes three types: Pred_L0 (uni-prediction of L0 prediction);Pred_L1 (uni-prediction of L1 prediction); and Pred_BI (bi-prediction ofBI prediction). If inter_pred_type is Pred_L0 or Pred_BI, informationrelated to the L0 prediction is set. If inter_pred_type is Pred_L1 orPred_BI, information related to the L1 prediction is set. In a P picture(P slice), inter_pred_type uniquely represents Pred_L0. Thus,inter_pred_type is omitted.

In the case of the skip mode, a prediction block is a coding block onwhich inter prediction is performed, and a merge mode is used as aprediction coding mode. Therefore, a merge index is set in the case ofthe skip mode.

Syntax according to the present embodiment is set as shown in FIG. 6.However, the syntax is not limited to this as long as coding blocks andprediction blocks have a plurality of block sizes and the merge mode andthe vector predictor mode can be used.

An explanation is given hereinafter, along with figures, regarding thedetails of a moving picture coding device, a moving picture codingmethod, and a moving picture coding program, and moving picture decodingdevice, a moving picture decoding method, and a moving picture decodingprogram according to a preferred embodiment of the present invention. Inthe explanations of the figures, the same elements shall be denoted bythe same reference numerals, and duplicative explanations will beomitted.

(Configuration of Moving Picture Coding Device 100)

FIG. 7 shows the configuration of a moving picture coding device 100according to a first embodiment. The moving picture coding device 100 isa device that codes a moving picture signal in units of predictionblocks for performing motion compensation prediction. It is assumed thatthe partition of a coding block, the determination of a skip mode, thedetermination of a prediction block size type, the determination of aprediction block size and a position in a coding block of a predictionblock (also referred to as position information or a prediction blocknumber of a prediction block), and the determination of whether aprediction coding mode is intra are determined by a higher-order codingcontrol unit (not shown). Thus, an explanation is given regarding a casewhere a prediction coding mode is not intra in the first embodiment. Anexplanation is given regarding a B picture (B slice), which correspondsto bi-prediction, in the first embodiment. For a P picture (P slice),which does not correspond to bi-prediction, L1 prediction needs to beomitted.

The moving picture coding device 100 is achieved by hardware such as aninformation processing device or the like provided with a CPU (CentralProcessing Unit), a frame memory, a hard disk, and the like. By theoperation of the above constituting elements, the moving picture codingdevice 100 achieves functional constituting elements explained in thefollowing. The position information, the prediction block size, and theprediction direction of motion compensation prediction of a targetprediction block are assumed to be shared in the moving picture codingdevice 100 and are thus not shown.

The moving picture coding device 100 according to the first embodimentincludes a prediction block picture derivation unit 101, a subtractionunit 102, a prediction error coding unit 103, a bitstream generationunit 104, a prediction error decoding unit 105, a motion compensationunit 106, an addition unit 107, a motion vector detection unit 108, amotion information generation unit 109, a frame memory 110, and a motioninformation memory 111.

(Function and Operation of Moving Picture Coding Device 100)

An explanation is given in the following regarding the function andoperation of each component. The prediction block picture derivationunit 101 derives a picture signal of a target prediction block from apicture signal supplied from a terminal 10 based on the positioninformation and prediction block size of the prediction block andsupplies the picture signal of the prediction block to the subtractionunit 102, the motion vector detection unit 108, and the motioninformation generation unit 109.

The motion vector detection unit 108 detects respective motion vectorsand respective reference indices showing reference pictures for the L0prediction and the L1 prediction in the picture signal supplied by theprediction block picture derivation unit 101 and respective picturesignals corresponding to a plurality of reference pictures storedtherein. The motion vector detection unit 108 supplies the respectivemotion vectors of the L0 prediction and the L1 prediction and therespective reference indices of the L0 prediction and the L1 predictionto the motion information generation unit 109. Although it is describedthat the motion vector detection unit 108 uses respective picturesignals corresponding to the plurality of reference pictures storedtherein as reference pictures, the motion vector detection unit 108 canalso use reference pictures stored in the frame memory 110.

In a commonly-practiced method of detecting a motion vector, anevaluation value of an error between a picture signal of a targetpicture and a prediction signal of a reference picture moved from thesame position by a predetermined amount of displacement is calculated,and an amount of displacement that results in the smallest evaluationvalue of the error is set to represent a motion vector. If there aplurality of reference pictures, a motion vector is detected for each ofthe reference pictures, and a reference picture with the smallestevaluation value of the error is selected. As the evaluation value ofthe error, a SAD (Sum of Absolute Difference) showing the sum of anabsolute difference, an MSE (Mean Square Error) showing a mean squareerror, or the like can be used. It is also possible to add a motionvector coding amount to the evaluation value of the error so as to makeevaluation.

The motion information generation unit 109 determines a predictioncoding mode based on the respective motion vectors of the L0 predictionand the L1 prediction and the respective reference indices of the L0prediction and the L1 prediction supplied by the motion vector detectionunit 108, a candidate block group supplied by the motion informationmemory 111, the reference pictures stored in the frame memory 110 thatare indicated by the respective reference indices, and the picturesignal supplied by the prediction block picture derivation unit 101.

Based on the prediction coding mode that has been determined, the motioninformation generation unit 109 supplies, to the bitstream generationunit 104, a merge flag, a merge index, a prediction direction of motioncompensation prediction, respective reference indices of the L0prediction and the L1 prediction, respective vector differences of theL0 prediction and the L1 prediction, and respective vector predictorindices of the L0 prediction and the L1 prediction, as necessary. Themotion information generation unit 109 supplies, to the motioncompensation unit 106 and the motion information memory 111, theprediction direction of motion compensation prediction, the respectivereference indices of the L0 prediction and the L1 prediction, andrespective motion vectors of the L0 prediction and the L1 prediction.Details of the motion information generation unit 109 will be describedlater.

If the prediction direction of motion compensation prediction suppliedby the motion information generation unit 109 is LN prediction, themotion compensation unit 106 performs motion compensation on a referencepicture in the frame memory 110 that is indicated by a reference indexof LN prediction supplied by the motion information generation unit 109based on a motion vector of LN prediction supplied by the motioninformation generation unit 109 so as to generate a prediction signalfor LN prediction. N is 0 or 1. If the prediction direction of motioncompensation prediction is bi-prediction, an average value of respectiveprediction signals for the L0 prediction and the L1 prediction is set torepresent the prediction signal. The respective prediction signals forthe L0 prediction and the L1 prediction may be weighted. The motioncompensation unit 106 supplies the prediction signals to the subtractionunit 102.

The subtraction unit 102 subtracts the picture signal supplied by theprediction block picture derivation unit 101 and the prediction signalssupplied by the motion compensation unit 106 so as to calculate aprediction error signal and supplies the prediction error signal to theprediction error coding unit 103.

The prediction error coding unit 103 generates prediction error codingdata by performing a process such as orthogonal transformation,quantization, or the like on the prediction error signal provided fromthe subtraction unit 102 and supplies the prediction error coding datato the bitstream generation unit 104 and the prediction error decodingunit 105.

The bitstream generation unit 104 subjects the prediction error codingdata supplied by the prediction error coding unit 103 and the mergeflag, the merge index, the prediction direction (inter prediction type)of motion compensation prediction, the respective reference indices ofthe L0 prediction and the L1 prediction, the respective vectordifferences of the L0 prediction and the L1 prediction, and therespective vector predictor indices of the L0 prediction and the L1prediction supplied by the motion information generation unit 109 toentropy coding according to the order of the syntax shown in FIG. 6 soas to generate a bitstream and supplies the bitstream to the terminal 11as a bitstream. The entropy coding is performed by a method includingvariable-length coding such as arithmetic coding, Huffman coding, or thelike.

The bitstream generation unit 104 multiplexes the partition informationfor the coding block, the prediction block size type, and the predictioncoding mode used in the moving picture coding device 100 in thebitstream along with an SPS (Sequence Parameter Set) defining aparameter group for determining the properties of the bitstream, a PPS(Picture Parameter Set) defining a parameter group for determining theproperties of the picture, a slice header defining a parameter group fordetermining the properties of the slice, and the like.

The prediction error decoding unit 105 generates a prediction errorsignal by performing a process such as inverse quantization, inverseorthogonal transformation, or the like on the prediction error codingdata supplied by the prediction error coding unit 103 and supplies theprediction error signal to the addition unit 107. The addition unit 107adds the prediction error signal supplied by the prediction errordecoding unit 105 and the prediction signals supplied by the motioncompensation unit 106 so as to generate a decoding picture signal andsupplies the decoding picture signal to the frame memory 110.

The frame memory 110 stores the decoding picture signal supplied by theaddition unit 107. For a decoded picture in which the decoding of theentire picture has been completed, the frame memory 110 stores apredetermined number of greater than or equal to one picture thereof asa reference picture. The frame memory 110 supplies a stored referencepicture signal to the motion compensation unit 106 and the motioninformation generation unit 109. A storage area that stores thereference images is controlled by a FIFO (First In First Out) method.

The motion information memory 111 stores motion information supplied bythe motion information generation unit 109 for a predetermined number ofpictures in units of the minimum prediction block sizes. The motioninformation memory 111 sets the motion information of a neighboringblock of the target prediction block to represent a spatial candidateblock group.

Also, the motion information memory 111 sets motion information in asame-position prediction block, which is located at the same position asthe target prediction block, on a ColPic and a block around thesame-position prediction block to represent a temporal candidate blockgroup. The motion information memory 111 supplies the spatial candidateblock group and the temporal candidate block group to the motioninformation generation unit 109 as candidate block groups. The motioninformation memory 111 is synchronized with the frame memory 110 and iscontrolled by the FIFO (First In First Out) method.

A ColPic is a picture that has been decoded and that is different from apicture with a target prediction block and is stored in the frame memory110 as a reference picture. In the first embodiment, a ColPic is areference picture that is decoded immediately before a target picture.In the first embodiment, the ColPic is a reference picture that isdecoded immediately before a target picture. However, as long as theColPic is a decoded picture, the ColPic may be a reference pictureimmediately before or immediately after the target picture in the orderof display and can be specified in a bitstream.

An explanation is now given regarding a method of managing the motioninformation in the motion information memory 111. The motion informationis stored in units of the minimum prediction blocks in each memory area.Each memory area stores at least a prediction direction, a motion vectorof L0 prediction, a reference index of L0 prediction, a motion vector ofL1 prediction, and a reference index of L1 prediction.

If the prediction coding mode is the intra mode, (0,0) is stored as therespective motion vectors of the L0 prediction and the L1 prediction,and “−1” is stored as the respective reference indices of the L0prediction and L1 prediction. Hereinafter, in (H,V) of a motion vector,H represents a horizontal component, and V represents a verticalcomponent. As long as it can be determined that a mode where motioncompensation prediction is not performed is used, the value “−1” of thereference indices may be any value. Hereinafter, what is simplyexpressed as “block” represents the minimum prediction block unit unlessotherwise noted. The same holds for a block outside the area. As in thecase of the intra mode, (0,0) is stored as respective motion vectors ofL0 prediction and L1 prediction, and “−1” is stored as respectivereference indices of L0 prediction and L1 prediction. An LX direction (Xis 0 or 1) being valid means that a reference index in the LX directionis larger than or equal to 0. The LX direction being invalid (not valid)means that the reference index in the LX direction is “−1”.

(Configuration of Motion Information Generation Unit 109)

An explanation is now given regarding the detailed configuration of themotion information generation unit 109. FIG. 8 shows the configurationof the motion information generation unit 109. The motion informationgeneration unit 109 includes a vector predictor mode determination unit120, a merge mode determination unit 121, and a prediction coding modedetermination unit 122. A terminal 12, a terminal 13, a terminal 14, aterminal 15, a terminal 16, a terminal 50, and a terminal 51 areconnected to the motion information memory 111, the motion vectordetection unit 108, the frame memory 110, the prediction block picturederivation unit 101, the bitstream generation unit 104, the motioncompensation unit 106, and the motion information memory 111,respectively.

(Function and Operation of Motion Information Generation Unit 109)

An explanation is given in the following regarding the function andoperation of each component. The vector predictor mode determinationunit 120 determines an inter prediction type based on a candidate blockgroup supplied by the terminal 12, respective motion vectors of L0prediction and L1 prediction and respective reference indices of the L0prediction and the L1 prediction supplied by the terminal 13, areference picture indicated by a reference index supplied by theterminal 14, and a picture signal supplied by the terminal 15. Based onthe inter prediction type, the vector predictor mode determination unit120 selects respective vector predictor indices of the L0 prediction andthe L1 prediction so as to calculate respective vector differences ofthe L0 prediction and the L1 prediction and calculate a prediction errorand also calculates a rate distortion evaluation value. The vectorpredictor mode determination unit 120 then supplies motion information,the vector differences, the vector predictor indices, and the ratedistortion evaluation value based on the inter prediction type to theprediction coding mode determination unit 122.

The merge mode determination unit 121 constructs a merging motioninformation candidate list from the candidate block group supplied bythe terminal 12, the reference picture supplied by the terminal 14, andthe picture signal supplied by the terminal 15, selects one mergingmotion information candidate from the merging motion informationcandidate list so as to determine a merge index, and calculates a ratedistortion evaluation value. The merge mode determination unit 121 thensupplies motion information of the merging motion information candidate,the merge index, and the rate distortion evaluation value to theprediction coding mode determination unit 122. Details of the merge modedetermination unit 121 will be described later.

The prediction coding mode determination unit 122 determines a mergeflag by comparing the rate distortion evaluation value supplied by thevector predictor mode determination unit 120 and the rate distortionevaluation value supplied by the merge mode determination unit 121.

If the rate distortion evaluation value for the vector predictor mode isless than the rate distortion evaluation value for the merge mode, theprediction coding mode determination unit 122 sets the merge flag to“0”. The prediction coding mode determination unit 122 supplies, to theterminal 16, the merge flag and the inter prediction type, the referenceindices, the vector differences, and the vector predictor index suppliedby the vector predictor mode determination unit 120 and supplies themotion information supplied by the vector predictor mode determinationunit 120 to the terminals 50 and 51.

If the rate distortion evaluation value for the merge mode is the ratedistortion evaluation value for the vector predictor mode or less, theprediction coding mode determination unit 122 sets the merge flag to“1”. The prediction coding mode determination unit 122 supplies, to theterminal 16, the merge flag and the merge index supplied by the mergemode determination unit 121 and supplies the motion information suppliedby the merge mode determination unit 121 to the terminals 50 and 51. Aspecific method of calculating a rate distortion evaluation value is notthe main point of the present invention, and a detailed explanationthereof is thus omitted. From a prediction error and a coding amount, aprediction error amount per a coding amount is calculated. The ratedistortion evaluation value is an evaluation value that has a propertywhere the coding efficiency becomes higher as the rate distortionevaluation value becomes smaller. Therefore, by selecting a predictioncoding mode with a small rate distortion evaluation value, the codingefficiency can be improved.

(Configuration of Merge Mode Determination Unit 121)

An explanation is now given regarding the detailed configuration of themerge mode determination unit 121. FIG. 9 is a diagram for explainingthe configuration of the merge mode determination unit 121. The mergemode determination unit 121 includes a merging motion informationcandidate list construction unit 140 and a merging motion informationselection unit 141. A merging motion information candidate listconstruction unit 140 is also provided in the same way in a movingpicture decoding device 200 that decodes a bitstream generated by themoving picture coding device 100 according to the first embodiment, andan identical merging motion information list is constructed each in themoving picture coding device 100 and the moving picture decoding device200.

(Function and Operation of Merge Mode Determination Unit 121)

An explanation is given in the following regarding the function andoperation of each component. The merging motion information candidatelist construction unit 140 constructs a merging motion informationcandidate list including merging motion information candidates of themaximum number of merge candidates from the candidate block groupsupplied by the terminal 12 and supplies the merging motion informationcandidate list to the merging motion information selection unit 141. Thedetailed configuration of the merging motion information candidate listconstruction unit 140 will be described later.

The merging motion information selection unit 141 selects an optimummerging motion information candidate from the merging motion informationcandidate list supplied from the merging motion information candidatelist construction unit 140, determines a merge index serving asinformation indicating the selected merging motion informationcandidate, and supplies the merge index to the terminal 17.

An explanation is now given regarding a method of selecting the optimummerging motion information candidate. A prediction error amount iscalculated from the reference picture obtained by performing motioncompensation prediction based on the prediction direction, motionvector, and reference index of the merging motion information candidateand supplied by the terminal 14 and from the picture signal supplied bythe terminal 15. A rate distortion evaluation value is calculated fromthe coding amount of the merge index and the prediction error amount,and a merging motion information candidate with the smallest ratedistortion evaluation value is selected as the optimum merging motioninformation candidate.

(Configuration of Merging Motion Information Candidate List ConstructionUnit 140)

An explanation is now given of the detailed configuration of the mergingmotion information candidate list construction unit 140. FIG. 10 is adiagram for explaining the configuration of the merging motioninformation candidate list construction unit 140. A terminal 19 isconnected to the merging motion information selection unit 141. Themerging motion information candidate list construction unit 140 includesa spatial merging motion information candidate generation unit 160, atemporal merging motion information candidate generation unit 161, aredundant merging motion information candidate deletion unit 162, afirst merging motion information candidate supplying unit 163, and asecond merging motion information candidate supplying unit 164.Hereinafter, an expression of “generating” a merging motion informationcandidate is used. However, the expression of “generating” may bechanged to an expression of “deriving”.

(Function and Operation of Merging Motion Information Candidate ListConstruction Unit 140)

An explanation is given in the following regarding the function andoperation of each component. FIG. 11 is a flowchart for explaining theoperation of the merging motion information candidate list constructionunit 140. First, the merging motion information candidate listconstruction unit 140 initializes a merging motion information candidatelist (S100). There is no merging motion information candidate in theinitialized merging motion information candidate list.

The spatial merging motion information candidate generation unit 160then generates spatial merging motion information candidates, as many aszero to the maximum number of spatial merging motion informationcandidates, from the candidate block group supplied by the terminal 12so as to add the generated spatial merging motion information candidatesto the merging motion information candidate list (S101) and supplies themerging motion information candidate list and the candidate block groupto the temporal merging motion information candidate generation unit161. The detailed operation of the spatial merging motion informationcandidate generation unit 160 will be described later. Descriptions willbe also made later regarding the maximum number of spatial mergingmotion information candidates.

The temporal merging motion information candidate generation unit 161then generates temporal merging motion information candidates, as manyas zero to the maximum number of temporal merging motion informationcandidates, from the candidate block group supplied by the spatialmerging motion information candidate generation unit 160 so as to addthe generated temporal merging motion information candidates to themerging motion information candidate list supplied by the spatialmerging motion information candidate generation unit 160 (S102) andsupplies the merging motion information candidate list to the redundantmerging motion information candidate deletion unit 162. The detailedoperation of the temporal merging motion information candidategeneration unit 161 will be described later. Descriptions will be alsomade later regarding the maximum number of temporal merging motioninformation candidates.

The redundant merging motion information candidate deletion unit 162then examines the merging motion information candidates added in themerging motion information candidate list supplied by the temporalmerging motion information candidate generation unit 161, leaves, ifthere are a plurality of merging motion information candidates havingthe same motion information, one of the plurality of merging motioninformation candidates while deleting the rest of the merging motioninformation candidates (S103), and supplies the merging motioninformation candidate list to the first merging motion informationcandidate supplying unit 163. Merging motion information candidatesadded to the merging motion information candidate list are all differentmerging motion information candidates at this time.

The first merging motion information candidate supplying unit 163 thengenerates zero to two first supplementary merging motion informationcandidates from the merging motion information candidates added to themerging motion information candidate list supplied by the redundantmerging motion information candidate deletion unit 162 so as to add thefirst supplementary merging motion information candidates to the mergingmotion information candidate list (S104) and supplies the merging motioninformation candidate list to the second merging motion informationcandidate supplying unit 164. The detailed operation of the firstmerging motion information candidate supplying unit 163 will bedescribed later.

The second merging motion information candidate supplying unit 164 thenkeeps generating second supplementary merging motion informationcandidates until the number of merging motion information candidatesadded to the merging motion information candidate list supplied by thefirst merging motion information candidate supplying unit 163 reachesthe maximum number of merge candidates so as to add the secondsupplementary merging motion information candidates to the mergingmotion information candidate list (S105) and supplies the merging motioninformation candidate list to the terminal 19. The detailed operation ofthe second merging motion information candidate supplying unit 164 willbe described later.

The spatial merging motion information candidate generation unit 160 andthe temporal merging motion information candidate generation unit 161are described to respectively generate a spatial merging motioninformation candidate and a temporal merging motion informationcandidate and respectively add the spatial merging motion informationcandidate and the temporal merging motion information candidate to themerging motion information candidate list. Alternatively, the spatialmerging motion information candidate generation unit 160 and thetemporal merging motion information candidate generation unit 161 mayonly generate a spatial merging motion information candidate and atemporal merging motion information candidate, respectively, and themerging motion information candidate list may be constructed fromcandidates generated immediately before redundant merging motioninformation candidate deletion unit 162.

(2N.Times.2N Candidate Block Group)

Hereinafter, an explanation is given regarding a candidate block groupof a prediction block. First, an explanation is given regarding aprediction block having a prediction block size type of 2N.times.2N.FIG. 12 is a diagram explaining a candidate block group of a predictionblock having a prediction block size type of 2N.times.2N. FIG. 12 showsan example where a prediction block size is 16 pixels.times.16 pixels.Temporal candidate blocks H and I described later exist in a decodedpicture that is different from a picture where spatial candidate blocksA through E, which are also described later, exist. However, for thesake of ease of understanding and explanation, FIG. 12 shows thetemporal candidate blocks H and I along with the spatial candidateblocks A through E.

The spatial candidate block group includes a block A located to the leftof a lower-left pixel of the prediction block, a block B located abovean upper-right pixel of the prediction block, a block C locateddiagonally above to the right of an upper-right pixel of the predictionblock, a block E located diagonally below to the left of a lower-leftpixel of the prediction block, and a block D located diagonally above tothe left of an upper-left pixel of the prediction block. As described,the spatial candidate block group is determined based on the positionand size of the prediction block. The temporal candidate block groupincludes two blocks: a block H and a block I, which are representativeblocks in a predetermined area of the ColPic. When the position of theupper-left pixel of the target prediction block is set to be (x, y) andthe width and height of the target prediction block are set to be PUWand PUH, respectively, a block on the ColPic that includes a pixelposition of ((((x+PUW)>>4)<<4), (((y+PUH)>>4)<<4)) as the position of anupper-left pixel of the block is set to be a temporal candidate block H,where “>>” represents a bit shift in a right direction and “<<”represents a bit shift in a left direction.

Similarly, a block on the ColPic that includes a pixel position of(x+(PUW>>1), y+(PUH>>1)) as the position of an upper-left pixel of theblock is set to be a temporal candidate block I. As described, thetemporal candidate block group is determined based on the position andsize of the prediction block. As described, by setting the temporalcandidate block as the representative blocks of the predetermined areaof the ColPic (16 pixels.times.16 pixels in this case), motion vectorsand reference indices to be stored by the ColPic can be reduced.Reducing motion vectors and reference indices that are stored in onepicture allows a plurality of decoded pictures to be subject to theColPic, thus having the effect of improving the prediction efficiency.

A coding block having a prediction block size type of 2N.times.2Nconsists of one prediction block. Thus, the position of a candidateblock with respect to a prediction block having a prediction block sizetype of 2N.times.2N is equal to the position of the candidate block withrespect to the coding block, and the position of the candidate block isoutside the coding block.

In the figure, the block A is located to the lower left of theprediction block. However, as long as the block A is in contact with theleft side of the prediction block, the position of the block A is notlimited to this. The block B is located to the upper right of theprediction block. However, as long as the block B is in contact with theupper side of the prediction block, the position of the block B is notlimited to this. The temporal candidate block group is set to includethe two blocks: the block H; and the block I. However, the temporalcandidate block group is not limited to this set.

(Example of Applying Same Positional Relationship as that of 2N.Times.2Nto Candidate Block of Group of Other than 2N.Times.2N)

An explanation is now given regarding an example where a positionalrelationship that is the same as that of a prediction block of a codingblock that has a prediction block size type of 2N.times.2N is applied toa prediction block in a coding block that does not have a predictionblock size type of 2N.times.2N. FIGS. 13A-13H are diagrams showing acandidate block group occurring when a positional relationship that isthe same as that of a prediction block of a coding block that has aprediction block size type of 2N.times.2N is applied to a predictionblock in a coding block that does not have a prediction block size typeof 2N.times.2N. In FIGS. 13A-13H, as in the case of FIG. 12, temporalcandidate blocks H and I exist in a decoded picture that is differentfrom a picture where spatial candidate blocks A through E exist.However, for the sake of ease of understanding and explanation, FIGS.13A-13H show the temporal candidate blocks H and I along with thespatial candidate blocks A through E. FIGS. 13A through 13H showrespective candidate block groups for a prediction block 0 having aprediction block size type of N.times.2N, a prediction block 1 having aprediction block size type of N.times.2N, a prediction block 0 having aprediction block size type of 2N.times.N, a prediction block 1 having aprediction block size type of 2N.times.N, a prediction block 0 having aprediction block size type of N.times.N, a prediction block 1 having aprediction block size type of N.times.N, a prediction block 2 having aprediction block size type of N.times.N, and a prediction block 3 havinga prediction block size type of N.times.N, respectively. FIGS. 13A-13Hshow an example where a prediction block size is 16 pixels.times.16pixels. A temporal candidate block group is derived in the same way asin the case of a prediction block size type of 2N.times.2N, and theposition of a block H is shown in FIGS. 13A-13H. As described, in aprediction block included in a coding block having a prediction blocksize type of 2N.times.2N, a candidate block group is determined for eachprediction block based on the position and size of the prediction block.

In the case of the prediction block 1 of a prediction block size type ofN.times.2N (FIG. 13B), a block A is located inside a prediction block 0of the same coding block, and motion information of the prediction block0 needs to be determined prior to the processing of the prediction block1 in order to obtain motion information of the block A. Thus, theprediction block 0 and the prediction block 1 cannot be processed at thesame time if the block A is used as a candidate block of the predictionblock 1. The maximum coding block is processed in raster scan order, anda coding block is processed in zigzag scanning order. Thus, a block Ealways becomes an unprocessed block. Similarly, in the case of theprediction block 1 of a prediction block size type of 2N.times.N (FIG.13D), a block B is located inside a prediction block 0 of the samecoding block, and a block C always becomes an unprocessed block. For theprediction block 1 (FIG. 13F), the prediction block 2 (FIG. 13G), theprediction block 3 (FIG. 13H) each having a prediction block size typeof N.times.N, a block in the same coding block and a block that alwaysbecomes an unprocessed block are respectively shown in FIG. 13.

In the prediction block 1 having a prediction block size type ofN.times.2N, the prediction block 1 having a prediction block size typeof 2N.times.N, the prediction block 1 having a prediction block sizetype of N.times.N, and the prediction block 2 having a prediction blocksize type of N.times.N, the number of candidate blocks that are notlocated inside the same coding block and do not become unprocessedblocks is three. In the prediction block 3 having a prediction blocksize type of N.times.N, the number of candidate blocks that are notlocated inside the same coding block and do not become unprocessedblocks is zero. A reduction in the number of candidate blocks leads to adecrease in the prediction efficiency.

(Positional Relationship of Candidate Block)

FIGS. 14A-14H are diagrams explaining an example of a positionalrelationship between a prediction block having a prediction block sizetype other than 2N.times.2N and a spatial candidate block group in thefirst embodiment. The same as in FIGS. 13A-13H also applies to atemporal candidate block group. FIGS. 14A through 14H show respectivespatial candidate block groups for a prediction block 0 having aprediction block size type of N.times.2N, a prediction block 1 having aprediction block size type of N.times.2N, a prediction block 0 having aprediction block size type of 2N.times.N, a prediction block 1 having aprediction block size type of 2N.times.N, a prediction block 0 having aprediction block size type of N.times.N, a prediction block 1 having aprediction block size type of N.times.N, a prediction block 2 having aprediction block size type of N.times.N, and a prediction block 3 havinga prediction block size type of N.times.N, respectively. FIGS. 14A-14Hshow an example where a prediction block size is 16 pixels.times.16pixels.

In the figure, a block located inside another prediction block in thesame coding block is replaced by a candidate block of a prediction blockhaving a prediction block size type of 2N.times.2N. In other words, inthe case of the prediction block 1 having a prediction block size typeof N.times.2N (FIG. 14B), a block A is changed to a block A of acandidate block of a prediction block having a prediction block sizetype of 2N.times.2N. In the case of the prediction block 1 of aprediction block size type of 2N.times.N (FIG. 14D), a block B ischanged to a block B of a candidate block of a prediction block having aprediction block size type of 2N.times.2N. In the case of the predictionblock 1 of a prediction block size type of N.times.N (FIG. 14F), a blockA and a block E are respectively changed to a block A and a block E ofcandidate blocks of a prediction block having a prediction block sizetype of 2N.times.2N. In the case of the prediction block 2 of aprediction block size type of N.times.N (FIG. 14G), a block B and ablock C are respectively changed to a block B and a block C that arecandidate blocks of a prediction block having a prediction block sizetype of 2N.times.2N. In the case of the prediction block 3 of aprediction block size type of N.times.N (FIG. 14H), a block A, a blockB, and a block D are respectively changed to a block A, a block B, and ablock D that are candidate blocks of a prediction block having aprediction block size type of 2N.times.2N.

The number of valid candidate blocks is five for the prediction block 1having a prediction block size type of N.times.2N, the prediction block1 having a prediction block size type of 2N.times.N, the predictionblock 1 having a prediction block size type of N.times.N, the predictionblock 2 having a prediction block size type of N.times.N, and theprediction block 3 having a prediction block size type of N.times.N.

As described above, by changing a candidate block included in anotherprediction block of the same coding block to a candidate block of aprediction block having a prediction block size type of 2N.times.2N,which results in the largest prediction block size of a prediction blocksize of a coding block, a dependence relationship of motion informationbetween the prediction blocks included in the coding block is lost, anda plurality of prediction blocks included in the coding block can beprocessed at the same time.

(Detailed Operation of Spatial Merging Motion Information CandidateGeneration Unit 160)

An explanation is now given of the detailed operation of the spatialmerging motion information candidate generation unit 160. FIG. 15 is aflowchart for explaining the operation of the spatial merging motioninformation candidate generation unit 160. The spatial merging motioninformation candidate generation unit 160 repeats the followingprocesses in order of a block A, a block B, a block C, a block E, and ablock D, which are candidate blocks included in a spatial candidateblock group of a candidate block group (S110 through S114).

First, the spatial merging motion information candidate generation unit160 checks whether a candidate block is valid (S111). A candidate blockbeing valid means that at least one of respective reference indices ofL0 prediction and L1 prediction of the candidate block is larger than orequal to 0. If the candidate block is valid (Y in S111), the spatialmerging motion information candidate generation unit 160 adds motioninformation of the candidate block to the merging motion informationcandidate list as a spatial merging motion information candidate (S112).If the candidate block is not valid (N in S111), the spatial mergingmotion information candidate generation unit 160 checks a subsequentcandidate block (S114). Subsequently to the step S112, the spatialmerging motion information candidate generation unit 160 checks whetherthe number of spatial merging motion information candidates added to themerging motion information candidate list is the maximum number ofspatial merging motion information candidates (S113). In this case, themaximum number of spatial merging motion information candidates is setto be 4. If the number of spatial merging motion information candidatesadded to the merging motion information candidate list is not themaximum number of spatial merging motion information candidates (N inS113), the spatial merging motion information candidate generation unit160 checks a subsequent candidate block (S114). If the number of spatialmerging motion information candidates added to the merging motioninformation candidate list is the maximum number of spatial mergingmotion information candidates (Y in S113), the spatial merging motioninformation candidate generation unit 160 ends the process.

In order for addition to the merging motion information candidate listwhile giving priority to motion information of the block A and the blockB, which have a long contact line with the target block and aregenerally considered to have high correlation with the target block, theorder of the processes are set to be the block A, the block B, the blockC, the block E, and the block D. However, the order of the processes isnot limited to this, as long as merging motion information candidatesare added to the merging motion information candidate list in descendingorder of correlation with the target block or in descending order of aselection probability as a candidate block. For example, in the case ofthe prediction block 1 having a prediction block size type ofN.times.2N, the order can be the order of a block B, a block C, a blockE, a block D, and a block A. In the case of the prediction block 1having a prediction block size type of 2N.times.N, the order can be ablock A, a block C, a block E, a block D, and a block B. In the case ofthe prediction block 1 having a prediction block size type of N.times.N,the order can be a block B, a block C, a block D, a block A, and a blockE. In the case of the prediction block 2 having a prediction block sizetype of N.times.N, the order can be a block A, a block E, a block D, ablock B, and a block C. In the case of the prediction block 3 having aprediction block size type of N.times.N, the order can be a block C, ablock E, a block A, a block B, and a block D. As described, by addingmerging motion information candidates to the merging motion informationcandidate list in order of closeness to the target prediction block,assignment of a large merge index to a block close to the targetprediction block can be prevented, and the coding efficiency can beimproved. The maximum number of spatial merging motion informationcandidates is set to be 4. However, the maximum number is not limited tothis as long as the number of spatial merging motion informationcandidates is larger than or equal to 1 and is smaller than or equal tothe maximum number of merge candidates.

(Detailed Operation of Temporal Merging Motion Information CandidateGeneration Unit 161)

An explanation is now given of the detailed operation of the temporalmerging motion information candidate generation unit 161. FIG. 16 is aflowchart for explaining the operation of the temporal merging motioninformation candidate generation unit 161. The temporal merging motioninformation candidate generation unit 161 repeats the followingprocesses for each prediction direction LX of L0 prediction and L1prediction (S120 through S127). X is 0 or 1. The temporal merging motioninformation candidate generation unit 161 repeats the followingprocesses in order of a block H and a block I, which are candidateblocks included in a temporal candidate block group of a candidate blockgroup (S121 through S126).

The temporal merging motion information candidate generation unit 161checks whether LN prediction of a candidate block is valid (S122). N is0 or 1. It is assumed that N is the same as X. LN prediction of acandidate block being valid means that a reference index of the LNprediction of the candidate block is larger than or equal to 0. If theLN prediction of the candidate block is valid (Y in S122), a motionvector of the LN prediction of the candidate block is set to be areference motion vector (S123). If the LN prediction of the candidateblock is not valid (N in S122), the steps 123 to 126 are skipped, and asubsequent candidate block is checked (S126).

Subsequently to the step S123, the temporal merging motion informationcandidate generation unit 161 determines a reference picture of the LXprediction of a temporal merging motion information candidate (S124). Inthis case, the reference picture of the LX prediction of the temporalmerging motion information candidate is set to be a reference picture ofa reference index 0. In this case, the reference picture of the LXprediction of the temporal merging motion information candidate is setto be a reference picture of a reference index 0. However, the referencepicture is not limited to this, as long as the reference picture doesnot depend on the value of another prediction block in the coding block.Then, by scaling the reference motion vector to match a distance betweenthe target picture and the reference picture of the LX prediction of thetemporal merging motion information candidate, the temporal mergingmotion information candidate generation unit 161 calculates a motionvector of the LX prediction of the temporal merging motion informationcandidate (S125) and processes the subsequent prediction direction(S127). A specific method of calculating the motion vector of the LXprediction of the temporal merging motion information candidate will bedescribed later. Subsequently to the step S127 where the processes areended for the L0 prediction and the L1 prediction, the temporal mergingmotion information candidate generation unit 161 checks whether at leastone of the L0 prediction and the L1 prediction of the temporal mergingmotion information candidate is valid (S128). If at least one of the L0prediction and the L1 prediction of the temporal merging motioninformation candidate is valid (Y in S128), the temporal merging motioninformation candidate generation unit 161 determines the interprediction type of the temporal merging motion information candidate andadds the temporal merging motion information candidate to the mergingmotion information candidate list (S129). For the determination of theinter prediction type, the inter prediction type of the temporal mergingmotion information candidate is set to be Pred_L0 if only the L0prediction is valid, the inter prediction type of the temporal mergingmotion information candidate is set to be Pred_1 if only the L1prediction is valid, and the inter prediction type of the temporalmerging motion information candidate is set to be Pred_BI if both the L0prediction and the L1 prediction are valid.

Subsequently, an explanation is given of the method of calculating themotion vector of the LX prediction of the temporal merging motioninformation candidate. If an inter-picture distance between a ColPichaving a temporal candidate block and a CoRefLXPic, which is a picturereferred to by the temporal candidate block in motion compensationprediction of the LX prediction, an inter-picture distance between areference image RefLXPic of the LX prediction of the temporal mergingmotion information candidate and a target picture CurPic, and thereference motion vector of the LX prediction are denoted as td, tb, andmvLX, respectively, a motion vector mvLXCol of the LX prediction of thetemporal merging motion information candidate is calculated byExpression 1. It can be understood based on Expression 1 thatsubtraction, division, and multiplication for calculating tb and td arenecessary for calculating the motion vector of the LX prediction of thetemporal merging motion information candidate.mvLXCol=tb/td*mvLX;  Expression 1

In the case of using integer arithmetic for the simplification offloating-point arithmetic, for example, Expression 1 may be used afterbeing expanded as in Expression 2 through Expression 4. Abs (v) is afunction for calculating the absolute value of a value v. Clip3(uv,lv,v)is a function that limits the value v to be from a lower limit lv to anupper limit uv. Sign (v) is a function that returns 1 if the value v islarger than or equal to 0 and returns −1 if the value v is smaller than0.tx=(16384+Abs(td/2))/td;  Expression 2DistScaleFactor=Clip3(−1024,1023,(tb*tx+32)>>6);  ExpressionmvLXCol=Sign(DistScaleFactor*mvLX)*((Abs(DistScaleFactor*mvLX)+127)>&−gt;8);  Expression 4

In this case, the maximum number of temporal merging motion informationcandidates, which in the maximum number of temporal merging motioninformation candidates that can be added to the merging motioninformation candidate list, is set to be 1. Therefore, although aprocess that corresponds to the step S115 shown in FIGS. 14A-14H, whichis a flowchart explaining the operation of the spatial merging motioninformation candidate generation unit 160, is omitted in FIG. 16, theprocess that corresponds to the step S115 can be added after the stepS129 if the maximum number of temporal merging motion informationcandidates is larger than or equal to 2.

In this case, N is set to be the same as X. However, N may be differentfrom X and is not limited to this.

(Detailed Operation of First Merging Motion Information CandidateSupplying Unit 163)

An explanation is now given of the detailed operation of the firstmerging motion information candidate supplying unit 163. FIG. 17 is aflowchart for explaining the operation of the first merging motioninformation candidate supplying unit 163. First, the first mergingmotion information candidate supplying unit 163 calculatesMaxNumGenCand, which is the maximum number for generating firstsupplementary merging motion information candidates, by Expression 5from the number of merging motion information candidates (NumCandList)and the maximum number of merge candidates (MaxNumMergeCand) added tothe merging motion information candidate list supplied by the firstmerging motion information candidate supplying unit 163 (S170).MaxNumGenCand=MaxNumMergeCand−NumCandList;(NumCandList>1)MaxNumGenCand=0;(NumCandList<=1)  Expression 5

Then, the first merging motion information candidate supplying unit 163checks whether MaxNumGenCand is larger than 0 (S171). If MaxNumGenCandis not larger than 0 (N in S171), the first merging motion informationcandidate supplying unit 163 ends the process. If MaxNumGenCand islarger than 0 (Y in S171), the first merging motion informationcandidate supplying unit 163 performs the following processes. First,the first merging motion information candidate supplying unit 163determines loopTimes, which is the number of combination checks.loopTimes is set to be NumCandListxNumCandList. If loopTimes exceeds 8,loopTimes is limited to 8 (S172). loopTimes is an integer of 0 to 7. Thefollowing processes are repeated only for loopTimes (S172 through S180).The first merging motion information candidate supplying unit 163determines a combination of a merging motion information candidate M anda merging motion information candidate N (S173). Relationships among thenumber of combination checks, the merging motion information candidateM, and the merging motion information candidate N. FIG. 18 is a diagramfor explaining relationships among the number of combination checks, themerging motion information candidate M, and the merging motioninformation candidate N. As in FIG. 18, M and N are different values andare set in ascending order of the total value of M and N. The firstmerging motion information candidate supplying unit 163 checks whetherthe L0 prediction of the merging motion information candidate M is validand whether the L1 prediction of the merging motion informationcandidate N is valid (S174). If the L0 prediction of the merging motioninformation candidate M is valid and the L1 prediction of the mergingmotion information candidate N is valid (Y in S174), the first mergingmotion information candidate supplying unit 163 checks whether areference picture and a motion vector of the L0 prediction of themerging motion information candidate M are different from a referencepicture and a motion vector of the L1 prediction of the merging motioninformation candidate N (S175). If the L0 prediction of the mergingmotion information candidate M is valid and the L1 prediction of themerging motion information candidate N is not valid (N in S174), thefirst merging motion information candidate supplying unit 163 processesa subsequent combination. If the reference picture of the L0 predictionof the merging motion information candidate M is different from thereference picture of the L1 prediction of the merging motion informationcandidate N is valid (Y in S175), the first merging motion informationcandidate supplying unit 163 generates a bi-merging motion informationcandidate having an inter prediction type of Pred_BI by combining themotion vector and the reference picture of L0 prediction of the mergingmotion information candidate M and the motion vector and the referencepicture of L1 prediction of the merging motion information candidate N(S176). In this case, the first merging motion information candidatesupplying unit 163 generates, as a first supplementary merging motioninformation candidate, bi-merging motion information obtained bycombining motion information of the L0 prediction of a merging motioninformation candidate and motion information of the L1 prediction of adifferent merging motion information candidate. If the reference pictureof the L0 prediction of the merging motion information candidate M isthe same as the reference picture of the L1 prediction of the mergingmotion information candidate N (N in S175), the first merging motioninformation candidate supplying unit 163 processes a subsequentcombination. Subsequently to the step S176, the first merging motioninformation candidate supplying unit 163 adds the bi-merging motioninformation candidate to the merging motion information candidate list(S178). Subsequently to the step S178, the first merging motioninformation candidate supplying unit 163 checks whether the number ofpieces of generated bi-merging motion information is MaxNumGenCand(S179). If the number of the pieces of generated bi-merging motioninformation is MaxNumGenCand (Y in S179), the first merging motioninformation candidate supplying unit 163 ends the process. If the numberof the pieces of generated bi-merging motion information is notMaxNumGenCand (N in S179), the first merging motion informationcandidate supplying unit 163 processes a subsequent combination.

In this case, the first supplementary merging motion informationcandidate is set to be a bi-merging motion information candidate, inwhich the direction of motion compensation prediction is bi-directional,by combining the motion vector and the reference picture of the L0prediction of a merging motion information candidate added to themerging motion information candidate list and the motion vector and thereference picture of the L1 prediction of another merging motioninformation candidate. However, the first supplementary merging motioninformation candidate is not limited to this. For example, the firstsupplementary merging motion information candidate may be a mergingmotion information candidate, in which the direction of motioncompensation prediction is bi-directional, obtained by adding an offsetvalue of +1 or the like to the motion vector of the L0 prediction andthe motion vector of the L1 prediction of a merging motion informationcandidate added to the merging motion information candidate list or amerging motion information candidate, in which the direction of motioncompensation prediction is uni-directional, obtained by adding an offsetvalue of +1 or the like to the motion vector of the L0 prediction or themotion vector of the L1 prediction of a merging motion informationcandidate added to the merging motion information candidate list. Asanother example of the first supplementary merging motion informationcandidate, a new merging motion information candidate, in which thedirection of motion compensation prediction is bi-directional, may begenerated by obtaining a motion vector of the L1 prediction by scalingusing, as a reference, a motion vector of the L0 prediction of a mergingmotion information candidate added to the merging motion informationcandidate list and then combining those motion vectors. Alternatively,those may be arbitrarily combined.

In this case, if there is a slight difference between motion informationof a merging motion information candidate added to the merging motioninformation candidate list and the motion of a target motion informationcandidate, the first supplementary merging motion information candidateallows for an increase in the coding efficiency by generating a newmerging motion information candidate that is valid by modifying themotion information of the merging motion information candidate added tothe merging motion information candidate list.

(Detailed Operation of Second Merging Motion Information CandidateSupplying Unit 164)

An explanation is now given of the detailed operation of the secondmerging motion information candidate supplying unit 164. FIG. 19 is aflowchart for explaining the operation of the second merging motioninformation candidate supplying unit 164. First, the second mergingmotion information candidate supplying unit 164 calculatesMaxNumGenCand, which is the maximum number for generating firstsupplementary merging motion information candidates, by Expression 6from the number of merging motion information candidates (NumCandList)and the maximum number of merge candidates (MaxNumMergeCand) added tothe merging motion information candidate list supplied by the firstmerging motion information candidate supplying unit 163 (S190).MaxNumGenCand=MaxNumMergeCand−NumCandList;  Expression 6

Then, the second merging motion information candidate supplying unit 164repeats the following processes for the number of times of MaxNumGenCandfor i (S191 through S195), where i is an integer of 0 to(MaxNumGenCand−1). The second merging motion information candidatesupplying unit 164 generates a second supplementary merging motioninformation candidate that has a motion vector of (0,0) and a referenceindex of i for the L0 prediction, a motion vector of (0,0) and areference index of i for the L1 prediction, and an inter prediction typeof Pred_BI (S192). The second merging motion information candidatesupplying unit 164 adds the second supplementary merging motioninformation candidate to the merging motion information candidate list(S194). The second merging motion information candidate supplying unit164 processes a subsequent i (S195).

In this case, the second supplementary merging motion informationcandidate is set to be a merging motion information candidate that has amotion vector of (0,0) and a reference index of i for the L0 prediction,a motion vector of (0,0) and a reference index of i for the L1prediction, and an inter prediction type of Pred_BI. This is because, ina commonly-used moving picture, the frequency of occurrence of a mergingmotion information candidate with a motion vector of (0,0) for the L0prediction and the L1 prediction is statistically high. The secondsupplementary merging motion information candidate is not limited tothis, as long as the second supplementary merging motion informationcandidate is set to a merging motion information candidate that does notdepend on motion information of a merging motion information candidateadded to the merging motion information candidate list and that has astatistically high frequency of use. For example, the motion vector ofthe L0 prediction and the motion vector of the L1 prediction each maytake a vector value other than (0,0) and may be set such that areference index of the L0 prediction and a reference index of the L1prediction are different. Alternatively, the second supplementarymerging motion information candidate can be set to be motion informationhaving a high frequency of occurrence of a coded picture or a portion ofa coded picture so as to be coded into a bitstream and then transmitted.In this case, an explanation is given regarding a B picture. In the caseof a P picture, a second supplementary merging motion informationcandidate having a motion vector of (0,0) for L0 prediction and an interprediction type of Pred_L0 is generated.

Setting a merging motion information candidate that does not depend on amerging motion information candidate added in the merging motioninformation candidate list as the second supplementary merging motioninformation candidate allows the use of a merge mode when the number ofmerging motion information candidates added in the merging motioninformation candidate list is zero, and the coding efficiency can beimproved. Also, when motion information of a merging motion informationcandidate added to the merging motion information candidate list isdifferent from the motion of a target motion information candidate, thecoding efficiency can be improved by increasing choices by generating anew merging motion information candidate.

(Configuration of Moving Picture Decoding Device 200)

An explanation is now given of a moving picture decoding deviceaccording to the first embodiment. FIG. 20 is a diagram showing theconfiguration of the moving picture decoding device 200 according to thefirst embodiment. The moving picture decoding device 200 is a devicethat generates a reproduction image by decoding a bitstream coded by themoving picture coding device 100.

The moving picture decoding device 200 is achieved by hardware such asan information processing device or the like provided with a CPU(Central Processing Unit), a frame memory, a hard disk, and the like. Bythe operation of the above constituting elements, the moving picturedecoding device 200 achieves functional constituting elements explainedin the following. It is assumed that the partition of a coding block,the determination of a skip mode, the determination of a predictionblock size type, the determination of a prediction block size and aposition in a coding block of a prediction block (also referred to asposition information of a prediction block), and the determination ofwhether a prediction coding mode is intra are determined by ahigher-order control unit (not shown). Thus, an explanation is givenregarding a case where a prediction coding mode is not intra. Theposition information and the prediction block size of a prediction blocksubject to decoding are assumed to be shared in the moving picturedecoding device 200 and are thus not shown.

The moving picture decoding device 200 according to the first embodimentincludes a bitstream analysis unit 201, a prediction error decoding unit202, an addition unit 203, a motion information reproduction unit 204, amotion compensation unit 205, a frame memory 206, and a motioninformation memory 207.

(Operation of Moving Picture Decoding Device 200)

An explanation is given in the following regarding the function andoperation of each component. The bitstream analysis unit 201 analyzes abitstream supplied by the terminal 30 so as to subject prediction errorcoding data, a merge flag, a merge index, a prediction direction (interprediction type) of motion compensation prediction, a reference index, avector difference, and a vector predictor index to entropy decodingaccording to syntax. The entropy decoding is performed by a methodincluding variable-length coding such as arithmetic coding, Huffmancoding, or the like. The bitstream analysis unit 201 supplies theprediction error coding data to the prediction error decoding unit 202and supplies the merge flag, the merge index, the inter prediction type,the reference index, the vector difference, and the vector predictorindex to the motion information reproduction unit 204.

The bitstream analysis unit 201 decodes partition information for acoding block, a prediction block size type, and a prediction coding modethat are used in the moving picture decoding device 200 from thebitstream along with an SPS (Sequence Parameter Set) defining aparameter group for determining the properties of the bitstream, a PPS(Picture Parameter Set) defining a parameter group for determining theproperties of a picture, a slice header defining a parameter group fordetermining the properties of a slice, and the like.

The motion information reproduction unit 204 reproduces motioninformation from the merge flag, the merge index, the inter predictiontype, the reference index, the vector difference, and the vectorpredictor index supplied by the bitstream analysis unit 201 and thecandidate block group supplied by the motion information memory 207 andsupplies the motion information to the motion compensation unit 205 andthe motion information memory 207. The detailed configuration of themotion information reproduction unit 204 will be described later.

The motion compensation unit 205 performs motion compensation on areference picture that is indicated by a reference index in the framememory 206 based on the motion information supplied by the motioninformation reproduction unit 204 so as to generate a prediction signal.If the prediction direction is bi-prediction, the motion compensationunit 205 generates the average of respective prediction signals for theL0 prediction and the L1 prediction as the prediction signal andsupplies the prediction signal to the addition unit 203.

The prediction error decoding unit 202 generates a prediction errorsignal by performing a process such as inverse quantization, inverseorthogonal transformation, or the like on the prediction error codingdata supplied by the bitstream analysis unit 201 and supplies theprediction error signal to the addition unit 203.

The addition unit 203 adds the prediction error signal supplied by theprediction error decoding unit 202 and the prediction signal supplied bythe motion compensation unit 205 so as to generate a decoding picturesignal and supplies the decoding picture signal to the frame memory 206and the terminal 31.

The frame memory 206 and the motion information memory 207 have the samerespective functions of the frame memory 110 and the motion informationmemory 111 of the moving picture coding device 100, respectively. Theframe memory 206 stores the decoding picture signal supplied by theaddition unit 203. The motion information memory 207 stores the motioninformation supplied by the motion information reproduction unit 204 inunits of the minimum prediction block sizes.

(Detailed Configuration of Motion Information Reproduction Unit 204)

An explanation is now given regarding the detailed configuration of themotion information reproduction unit 204. FIG. 21 shows theconfiguration of the motion information reproduction unit 204. Themotion information reproduction unit 204 includes a coding mode decisionunit 210, a motion vector reproduction unit 211, and a merging motioninformation reproduction unit 212. A terminal 32, a terminal 33, aterminal 34, and a terminal 36 are connected to the bitstream analysisunit 201, the motion information memory 207, the motion compensationunit 205, and the motion information memory 207, respectively.

(Detailed Operation of Motion Information Reproduction Unit 204)

An explanation is given in the following regarding the function andoperation of each component. The coding mode decision unit 210determines whether the merge flag supplied by the bitstream analysisunit 201 is “0” or “1”. If the merge flag is “0”, the coding modedecision unit 210 supplies the inter prediction type, the referenceindex, the vector difference, and the vector predictor index supplied bythe bitstream analysis unit 201 to the motion vector reproduction unit211. If the merge flag is “1”, the coding mode decision unit 210supplies the merge index supplied by the bitstream analysis unit 201 tothe merging motion information reproduction unit 212.

The motion vector reproduction unit 211 reproduces a motion vector fromthe inter prediction type, the reference index, the vector difference,and the vector predictor index supplied by the coding mode decision unit210 and the candidate block group supplied by the terminal 22 so as togenerate motion information and supplies the motion information to theterminal 34 and the terminal 36.

The merging motion information reproduction unit 212 constructs amerging motion information candidate list from the candidate block groupsupplied by the terminal 33, selects motion information of a mergingmotion information candidate indicated by the merge index supplied bythe coding mode decision unit 210 from the merging motion informationcandidate list, and supplies the motion information to the terminal 34and the terminal 36.

(Detailed Configuration of Merging Motion Information Reproduction Unit212)

An explanation is now given regarding the detailed configuration of themerging motion information reproduction unit 212. FIG. 22 shows theconfiguration of the merging motion information reproduction unit 212.The merging motion information reproduction unit 212 includes a mergingmotion information candidate list construction unit 230 and a mergingmotion information selection unit 231. A terminal 35 is connected to thecoding mode decision unit 210.

(Detailed Operation of Merging Motion Information Reproduction Unit 212)

An explanation is given in the following regarding the function andoperation of each component. The merging motion information candidatelist construction unit 230 has the same function as the merging motioninformation candidate list construction unit 140 of the moving picturecoding device 100, constructs a merging motion information candidatelist by the same operation as the merging motion information candidatelist construction unit 140 of the moving picture coding device 100, andsupplies the merging motion information candidate list to the mergingmotion information selection unit 231.

The merging motion information selection unit 231 selects a mergingmotion information candidate indicated by the merge index supplied bythe terminal 35 from the merging motion information candidate listsupplied by the merging motion information candidate list constructionunit 230, determines merging motion information, and supplies motioninformation of the merging motion information to the terminals 34 and36.

As described above, the moving picture decoding device 200 is capable ofgenerating a reproduction image by decoding a bitstream coded by themoving picture coding device 100.

Second Embodiment

An explanation is given in the following regarding a second embodiment.A spatial candidate block group used in the spatial merging motioninformation candidate generation unit 160 for a prediction block havinga prediction block size type other than 2N.times.2N is different fromthat in the first embodiment. An explanation is given in the followingregarding a spatial candidate block group of a prediction block having aprediction block size type other than 2N.times.2N in the secondembodiment.

FIGS. 23A-23H are diagrams explaining a positional relationship betweena prediction block having a prediction block size type other than2N.times.2N and a spatial candidate block group in the secondembodiment. FIGS. 23A through 23H show respective spatial candidateblock groups for a prediction block 0 having a prediction block sizetype of N.times.2N, a prediction block 1 having a prediction block sizetype of N.times.2N, a prediction block 0 having a prediction block sizetype of 2N.times.N, a prediction block 1 having a prediction block sizetype of 2N.times.N, a prediction block 0 having a prediction block sizetype of N.times.N, a prediction block 1 having a prediction block sizetype of N.times.N, a prediction block 2 having a prediction block sizetype of N.times.N, and a prediction block 3 having a prediction blocksize type of N.times.N, respectively. FIGS. 23A-23H show an examplewhere a prediction block size is 16 pixels.times.16 pixels. Asdescribed, in a prediction block included in a coding block having aprediction block size type of 2N.times.2N, a candidate block group isdetermined for each prediction block based on the position and size ofthe prediction block.

In the figure, in addition to the first example, a block that alwaysbecomes unprocessed is replaced by a candidate block of a predictionblock having a prediction block size type of 2N.times.2N. In otherwords, in the case of a prediction block 1 having a prediction blocksize type of N.times.2N (FIG. 23B), a block E is changed to a block E ofa candidate block of a prediction block having a prediction block sizetype of 2N.times.2N. In the case of a prediction block 1 having aprediction block size type of 2N.times.N (FIG. 23D), a block C ischanged to a block C of a candidate block of a prediction block having aprediction block size type of 2N.times.2N. In the case of a predictionblock 1 having a prediction block size type of N.times.N (FIG. 23H), ablock C and a block E are respectively changed to a block C and a blockE of candidate blocks of a prediction block having a prediction blocksize type of 2N.times.2N.

As described above, by changing a candidate block that always becomesunprocessed to a candidate block of a prediction block having aprediction block size type of 2N.times.2N, the candidate block thatalways becomes unprocessed can be changed to a candidate block havingthe possibility of becoming valid. An increase in choices of merge modesincreases the selectivity of the merge modes, and the coding efficiencycan thus be improved. The coding efficiency can be improved by adding afirst supplementary merging motion information candidate havingrelatively higher selectivity than a second supplementary merging motioninformation candidate to the merging motion information candidate listby generating new motion information by combining motion information ofthe replaced candidate block and motion information of another mergingmotion information candidate or by modifying the motion information ofthe replaced candidate block. In particular, since at least two mergingmotion information candidates are required when using a bi-mergingmotion information candidate, motion information of a replaced candidateblock operates effectively in the case where there is only one mergingmotion information candidate, other than the replaced candidate block,that is added to the merging motion information candidate list.

In the operation of the spatial merging motion information candidategeneration unit 160, the order of addition to the merging motioninformation candidate list is set to be the order of a block A, a blockB, a block C, a block E, and a block D. However, the order can bechanged as follows.

In the case of the prediction block 1 having a prediction block sizetype of N.times.2N, the order can be the order of a block B, a block C,a block D, a block A, and a block E. In the case of the prediction block1 having a prediction block size type of 2N.times.N, the order can be ablock A, a block E, a block D, a block B, and a block C. In the case ofthe prediction block 1 having a prediction block size type of N.times.N,the order can be a block B, a block C, a block D, a block A, and a blockE. In the case of the prediction block 2 having a prediction block sizetype of N.times.N, the order can be a block A, a block E, a block D, ablock B, and a block C. As described, by adding merging motioninformation candidates to the merging motion information candidate listin order of closeness to the target prediction block, assignment of alarge merge index to a block close to the target prediction block can beprevented, and the coding efficiency can be improved.

Third Embodiment

First, an explanation is given regarding an example where a candidateblock of a prediction block in a coding block is shared withoutdepending on a prediction block size type. A prediction block having aprediction block size type other than 2N.times.2N, a spatial candidateblock group, and a temporal candidate block group are different fromthose in the first embodiment. An explanation is given in the followingregarding a prediction block having a prediction block size type otherthan 2N.times.2N, a spatial candidate block group, and a temporalcandidate block group in an example where a candidate block of aprediction block in a coding block is shared without depending on aprediction block size type. In this example, a candidate block of aprediction block in a coding block shared without depending on aprediction block size type is used as a candidate block of a predictionblock having a prediction block size type other than 2N.times.2N.

FIGS. 24A-24H are diagrams explaining a positional relationship betweena prediction block having a prediction block size type other than2N.times.2N and a candidate block group in an example where a candidateblock of a prediction block in a coding block is shared withoutdepending on a prediction block size type. In FIGS. 24A-24H, temporalcandidate blocks H and I exist in a decoded picture that is differentfrom a picture where spatial candidate blocks A through E exist.However, for the sake of ease of understanding and explanation, FIGS.24A-24H show the temporal candidate blocks H and I along with thespatial candidate blocks A through E. FIGS. 24A through 24H showrespective spatial candidate block groups for a prediction block 0having a prediction block size type of N.times.2N, a prediction block 1having a prediction block size type of N.times.2N, a prediction block 0having a prediction block size type of 2N.times.N, a prediction block 1having a prediction block size type of 2N.times.N, a prediction block 0having a prediction block size type of N.times.N, a prediction block 1having a prediction block size type of N.times.N, a prediction block 2having a prediction block size type of N.times.N, and a prediction block3 having a prediction block size type of N.times.N, respectively. FIGS.24A-24H show an example where a prediction block size is 16pixels.times.16 pixels. As a temporal candidate block group of aprediction block having a prediction block size type other than2N.times.2N, a temporal candidate block group derived as a predictionblock having a prediction block size type of 2N.times.2N is used asshown in FIGS. 24A-24H.

As described above, a candidate block does not depend on a predictionblock size type and is set to be a candidate block of a prediction blockhaving a prediction block size type of 2N.times.2N. In other words,without depending on a prediction block size type, a candidate blockobtained when a prediction block size type is 2N.times.2N is shared inall prediction blocks in the coding block. In other words, according tothe merging motion information candidate list construction units 140 and230, an identical merging motion information candidate list isconstructed if an identical candidate block is used. Therefore, withoutdepending on a prediction block size type, a merging motion informationcandidate list derived when a prediction block size type is 2N.times.2Nis shared in all prediction blocks in the coding block. Thereby, beforethe determination of a prediction block size type, a candidate block canbe determined so that a merging motion information candidate list can bedetermined. In the case where the coding block is partitioned into aplurality of prediction blocks, it is no longer necessary to derive acandidate block for each prediction block. Thus, the number of times themerging motion information candidate list shown in FIG. 11 isconstructed is reduced to ½ (in the case of halving partitioning) or ¼(in the case of quartering partitioning). Also, the prediction blocks ofthe coding block can be processed in parallel.

An explanation is given in the following regarding another example ofthe third embodiment. A spatial candidate block group and a temporalcandidate block group used in the spatial merging motion informationcandidate generation unit 160 and the operation of the merging motioninformation candidate list construction unit 140 for a prediction blockhaving a prediction block size type other than 2N.times.2N are differentfrom those in the first embodiment. An explanation is given in thefollowing regarding a spatial candidate block group and a temporalcandidate block group of a prediction block having a prediction blocksize type other than 2N.times.2N in the third embodiment.

In this case, in the case where a prediction block is partitioned into aplurality of pieces, a candidate block of a prediction block 0 is usedas a candidate block of all prediction blocks in the coding block.

FIGS. 25A-25H are diagrams explaining a positional relationship betweena prediction block having a prediction block size type other than2N.times.2N and a candidate block group in the third embodiment. InFIGS. 25A-25H, temporal candidate blocks H and I exist in a decodedpicture that is different from a picture where spatial candidate blocksA through E exist. However, for the sake of ease of understanding andexplanation, FIGS. 25A-25H show the temporal candidate blocks H and Ialong with the spatial candidate blocks A through E. FIGS. 25A through25H show respective spatial candidate block groups and respectivetemporal candidate block groups for a prediction block 0 having aprediction block size type of N.times.2N, a prediction block 1 having aprediction block size type of N.times.2N, a prediction block 0 having aprediction block size type of 2N.times.N, a prediction block 1 having aprediction block size type of 2N.times.N, a prediction block 0 having aprediction block size type of N.times.N, a prediction block 1 having aprediction block size type of N.times.N, a prediction block 2 having aprediction block size type of N.times.N, and a prediction block 3 havinga prediction block size type of N.times.N, respectively. FIGS. 25A-25Hshow an example where a prediction block size is 16 pixels.times.16pixels. As a temporal candidate block group of a prediction block havinga prediction block size type other than 2N.times.2N, a temporalcandidate block group derived as a prediction block 0 is used as shownin FIGS. 25A-25H.

An explanation is now given of the operation of the merging motioninformation candidate list construction unit 140. FIG. 26 is a flowchartexplaining the operation of the merging motion information candidatelist construction unit 140 according to the third embodiment. Additionof step S106 and step S107 is different from FIG. 11 showing theoperation of the merging motion information candidate list constructionunit 140 according to the first embodiment. An explanation is givenregarding the step S106 and the step S107, which are different from thefirst embodiment. The merging motion information candidate listconstruction unit 140 checks whether the target prediction block is aprediction block 0 (S106). If the target prediction block is aprediction block 0 (Y in S106), the merging motion information candidatelist construction unit 140 performs the processes from step S100 to S105and ends the process. If the target prediction block is not a predictionblock 0 (N in S106), the merging motion information candidate listconstruction unit 140 uses the merging motion information candidate listof the prediction block 0 as the merging motion information candidatelist of the target prediction block (S107) and ends the process.

As described above, by using a candidate block of a prediction block 0as a candidate block of all prediction blocks in the coding block in thecase where the coding block is partitioned into a plurality ofprediction blocks, it is no longer necessary to construct a mergingmotion information candidate list of a prediction block other than theprediction block 0. Thus, the number of times the merging motioninformation candidate list shown in FIG. 11 is constructed is reduced to½ (in the case of halving partitioning) or ¼ (in the case of quarteringpartitioning). In other words, a merging motion information candidatelist derived in the prediction block 0 can be also shared in any of theprediction blocks of the coding block. Also, since the merging motioninformation candidate list can be constructed before the position of aprediction block is determined if the prediction block size type isdetermined, a circuit design and a software design can become flexible,and a circuit size and a software size can be reduced. Also, theprediction blocks of the coding block can be processed in parallel.

Further, by setting the position of a candidate block of a predictionblock having a prediction block size type other than 2N.times.2N to bethe position of a candidate block different from those of a predictionblock having a prediction block size type of 2N.times.2N, the selectionprobability of a prediction block having a prediction block size type of2N.times.2N can be increased, and the coding efficiency can be moreimproved compared to the example where a candidate block of a predictionblock in a coding block is shared without depending on a predictionblock size type. Further, since the prediction block 0 does not includea candidate block included in another prediction block in the samecoding block or a candidate block that always becomes unprocessed, theprobability of a merging motion information candidate becoming valid canbe increased, and the prediction efficiency can thus be improved. Sincethe skip mode in which the coding efficiency is the highest isequivalent to a prediction block size type of 2N.times.2N, there is noeffect caused by the present embodiment.

In the third embodiment, as a representative block of a coding block, aprediction block 0, which is the first prediction block in the codingblock, is used. However, the representative block is not limited tothis. For example, a prediction block that uses a merge mode first inthe coding block can be also used. In this case, S106 and S107 are asshown in the following. Whether a merging motion information candidatelist has already been constructed in the coding block is checked (S106).If a merging motion information candidate list has not been alreadyconstructed in the coding block (Y in S106), the processes from stepS100 to S105 are performed, and the process is ended. If a mergingmotion information candidate list has already been constructed in thecoding block (N in S106), the merging motion information candidate listalready constructed in the coding block is used (S107), and the processis ended.

As described above, by using a merging motion information candidate listof a prediction block that uses a merge mode first in the coding blockalso in another prediction block in the coding block, at least theprediction efficiency of a prediction block that uses a merge mode firstcan be improved. Also, as a representative block of the coding block,the last prediction block (a prediction block 1 in the case of halvingpartitioning and a prediction block 3 in the case of quarteringpartitioning) in the coding block can be also used. In this case, bysetting the position of a temporal candidate block group to be theposition of a candidate block different from those of a prediction blockhaving a prediction block size type of 2N.times.2N, the selectionprobability of a prediction block having a prediction block size typeother than 2N.times.2N can be increased, and the prediction efficiencycan be improved.

Also, as in the second embodiment, the addition to the merging motioninformation candidate list can be in the order of closeness to a targetprediction block.

First Exemplary Variation of Third Embodiment

An explanation is given in the following regarding a first exemplaryvariation of the third embodiment. Limitation of a temporal candidateblock group by a maximum coding block lower limit line is different fromthe third embodiment. An explanation is given regarding the limitationof a temporal candidate block group by a maximum coding block lowerlimit line. FIG. 27 is a diagram explaining a maximum coding block lowerlimit line and a temporal candidate block group. As shown in FIG. 27, amaximum coding block lower limit line is a line where pixels of thelowermost part of a maximum coding block are included. By imposing alimitation such that a block located below the maximum coding blocklower limit line, the capacity of a temporary storage area for atemporal candidate block group can be reduced in the moving picturecoding device 100 and the moving picture decoding device 200.

If a positional relationship that is the same as that of a predictionblock of a coding block that has a prediction block size type of2N.times.2N is applied to a prediction block in a coding block that doesnot have a prediction block size type of 2N.times.2N, the position of atemporal candidate block (H1) of a prediction block 1 having aprediction block size type of 2N.times.N, which is in contact with themaximum coding block lower limit line shown in 27, cannot be used in thecase where the maximum coding block lower limit line is provided.

However, as in the third embodiment, by using, when a prediction blockis partitioned into a plurality of blocks, a candidate block of aprediction block 0 as a candidate block of all prediction blocks in thecoding block, a temporal candidate block (H0) is used as a temporalcandidate block group. Thus, the temporal candidate block can be madevalid, and the prediction efficiency can thus be improved. This alsoapplies to a prediction block 2 and a prediction block 3 having aprediction block size type of N.times.N.

Fourth Embodiment

An explanation is given in the following regarding a fourth embodiment.A spatial candidate block group and a temporal candidate block group ofa prediction block having a prediction block size type other than2N.times.2N and the configuration and operation of the merging motioninformation candidate list construction unit 140 are different fromthose in the first embodiment. An explanation is given in the followingregarding a prediction block having a prediction block size type otherthan 2N.times.2N, a spatial candidate block group, and a temporalcandidate block group in the fourth embodiment.

In this case, it is assumed that a positional relationship that is thesame as that of a prediction block of a coding block having a predictionblock size type of 2N.times.2N is applied in in the spatial candidateblock group. As the temporal candidate block group, a temporal candidateblock group derived as the prediction block 0 is used.

FIGS. 28A-28H are diagrams explaining a positional relationship betweena prediction block having a prediction block size type other than2N.times.2N and a candidate block group in the fourth embodiment. InFIGS. 28A-28H, temporal candidate blocks H and I exist in a decodedpicture that is different from a picture where spatial candidate blocksA through E exist. However, for the sake of ease of understanding andexplanation, FIGS. 28A-28H show the temporal candidate blocks H and Ialong with the spatial candidate blocks A through E. FIGS. 28A through28H show respective spatial candidate block groups for a predictionblock 0 having a prediction block size type of N.times.2N, a predictionblock 1 having a prediction block size type of N.times.2N, a predictionblock 0 having a prediction block size type of 2N.times.N, a predictionblock 1 having a prediction block size type of 2N.times.N, a predictionblock 0 having a prediction block size type of N.times.N, a predictionblock 1 having a prediction block size type of N.times.N, a predictionblock 2 having a prediction block size type of N.times.N, and aprediction block 3 having a prediction block size type of N.times.N,respectively. FIGS. 28A-28H show an example where a prediction blocksize is 16 pixels.times.16 pixels. As a temporal candidate block groupof a prediction block having a prediction block size type other than2N.times.2N, a temporal candidate block group derived as a predictionblock 0 is used as shown in FIGS. 28A-28H. Undoubtedly, as a temporalcandidate block group of a prediction block having a prediction blocksize type other than 2N.times.2N, a temporal candidate block groupderived as a prediction block having a prediction block size type of2N.times.2N can be also used.

An explanation is now given of the configuration and operation of themerging motion information candidate list construction unit 140. FIG. 29is a diagram explaining the configuration of the merging motioninformation candidate list construction unit 140 according to the fourthembodiment. The position of the temporal merging motion informationcandidate generation unit 161 provided in a stage following the firstmerging motion information candidate supplying unit 163 is differentfrom that in the first embodiment. FIG. 30 is a flowchart explaining theoperation of the merging motion information candidate list constructionunit 140 according to the fourth embodiment. Addition of step S106 andstep S108 and the position of the step S102 are different from FIG. 11showing the operation of the merging motion information candidate listconstruction unit 140 according to the first embodiment. An explanationis given regarding differences from the first embodiment.

The spatial merging motion information candidate generation unit 160generates spatial merging motion information candidates, as many as zeroto the maximum number of spatial merging motion information candidates,from the candidate block group supplied by the terminal 12 so as to addthe generated spatial merging motion information candidates to themerging motion information candidate list (S101) and supplies themerging motion information candidate list and the candidate block groupto the redundant merging motion information candidate deletion unit 162.

The redundant merging motion information candidate deletion unit 162then examines the merging motion information candidates added in themerging motion information candidate list supplied by the spatialmerging motion information candidate generation unit 160, leaves, ifthere are a plurality of merging motion information candidates havingthe same motion information, one of the plurality of merging motioninformation candidates while deleting the rest of the merging motioninformation candidates (S103), and supplies the merging motioninformation candidate list to the first merging motion informationcandidate supplying unit 163.

The first merging motion information candidate supplying unit 163 thengenerates zero to two first supplementary merging motion informationcandidates from the merging motion information candidates added to themerging motion information candidate list supplied by the redundantmerging motion information candidate deletion unit 162 so as to add thefirst supplementary merging motion information candidates to the mergingmotion information candidate list (S104) and supplies the merging motioninformation candidate list and the candidate block group to the temporalmerging motion information candidate generation unit 161.

Next, the temporal merging motion information candidate generation unit161 checks whether the target prediction block is a prediction block 0(S106). If the target prediction block is a prediction block 0 (Y inS106), the temporal merging motion information candidate generation unit161 generates temporal merging motion information candidates, as many aszero to the maximum number of temporal merging motion informationcandidates, from the candidate block group supplied by the redundantmerging motion information candidate deletion unit 162 so as to add thegenerated temporal merging motion information candidates to the mergingmotion information candidate list supplied by the redundant mergingmotion information candidate deletion unit 162 (S102) and supplies themerging motion information candidate list to the second merging motioninformation candidate supplying unit 164. If the target prediction blockis not a prediction block 0 (N in S106), the temporal merging motioninformation candidate generation unit 161 adds a temporal merging motioninformation candidate of a candidate block 0 to the merging motioninformation candidate list (S108) and supplies the merging motioninformation candidate list to the second merging motion informationcandidate supplying unit 164.

The second merging motion information candidate supplying unit 164 thenkeeps generating second supplementary merging motion informationcandidates until the number of merging motion information candidatesadded to the merging motion information candidate list supplied by thetemporal merging motion information candidate generation unit 161reaches the maximum number of merge candidates so as to add the secondsupplementary merging motion information candidates to the mergingmotion information candidate list (S105) and supplies the merging motioninformation candidate list to the terminal 19.

As described above, by setting a spatial candidate block group of aprediction block having a prediction block size type other than2N.times.2N to be the one in which a positional relationship that is thesame as that of a prediction block of a coding block that has aprediction block size type of 2N.times.2N is applied and setting atemporal candidate block group to be a temporal candidate block group ofa prediction block 0, the temporal candidate block group can bedetermined upon the determination of the prediction block size type. Inother words, a temporal merging motion information candidate derived inthe prediction block 0 can be also shared in any of the predictionblocks of the coding block. On the other hand, the spatial candidateblock group is determined for each prediction block based on theposition and size of the prediction block. Since motion information of acandidate block is directly used for the derivation of a spatial mergingmotion information candidate, an arithmetic operation is unnecessary,and the processing time is thus short. However, since a process ofcalculating a vector such as those in Expression 1 or Expression 2through Expression 4 is necessary for the derivation of a temporalmerging motion information candidate and since there is a process ofdetermining an inter prediction type, the processing time becomeslonger.

Thus, by setting the derivation of a temporal merging motion informationcandidate that requires the longest processing time in a process ofconstructing the merging motion information candidate list to beperformed once in a coding block, the processing time required when aprediction block is partitioned into a plurality of blocks can beshortened.

Further, by using a block neighboring the target prediction block as aspatial merging motion information candidate, the selection probabilityof a prediction block having a prediction block size type other than2N.times.2N can be increased, and the coding efficiency can be moreimproved compared to the example where a candidate block of a predictionblock in a coding block is shared without depending on a predictionblock size type. Also, since representative blocks in a predeterminedarea of a ColPic are used as the temporal candidate block group, theaccuracy of the temporal candidate block group becomes relatively lowcompared to the spatial candidate block group, and a decrease in theprediction efficiency can be prevented even when the accuracy of thetemporal candidate block group is lowered.

In this case, the time used for deriving a temporal merging motioninformation candidate is sufficiently longer than the derivation of aspatial merging motion information candidate, the operation of theredundant merging motion information candidate deletion unit 162, andthe operation of the first merging motion information candidatesupplying unit 163, and the operation of the merging motion informationcandidate list construction unit 140 is set as shown in FIG. 30.Alternatively, for example, S106, S102, and S108 may be moved in a stagefollowing S101 or S103 giving priority to the prediction efficiency ormay be provided in a stage following S105 giving priority to theprocessing efficiency. In the case of providing S106, S102, and S108 ina stage following S105, the number of merging motion informationcandidates added to the merging motion information candidate list outputfrom the second merging motion information candidate supplying unit 164is set to be a number that is smaller than the maximum number of mergecandidates by one.

In this case, focusing on the prediction efficiency, a positionalrelationship that is the same as that of a prediction block of a codingblock that has a prediction block size type of 2N.times.2N is applied inthe spatial candidate block group. However, in order to achieve parallelprocessing of a prediction block in the coding block, a candidate blockincluded in another prediction block in the same coding block may be setsuch that the candidate block is not used as a candidate block.Alternatively, as the temporal candidate block group, a temporalcandidate block group derived as a prediction block 0 may be used bycombining the spatial candidate block group with those of otherembodiments.

Also, in this case, a temporal candidate block group of a predictionblock having a prediction block size type other than 2N.times.2N is setto be a temporal candidate block group derived in a prediction block 0,which is the first prediction block in the coding block. However, thetemporal candidate block group is not limited to this. For example, thetemporal candidate block group may be a temporal candidate block groupof a prediction block obtained when the prediction block size type is2N.times.2N or may be a temporal candidate block group of the lastprediction block (a prediction block 1 in the case of halvingpartitioning and a prediction block 3 in the case of quarteringpartitioning) in the coding block. If the temporal candidate block groupis set to be a temporal candidate block group of a prediction blockobtained when the prediction block size type is 2N.times.2N, thetemporal candidate block group can be generated before the predictionblock size type and the position of a prediction block are determined.Therefore, a circuit design and a software design can become flexible,and a circuit size and a software size can be reduced.

Fifth Embodiment

An explanation is given in the following regarding a fifth embodiment.From the first embodiment, the configuration and operation of themerging motion information candidate list construction unit 140 aredifferent, and the operation of the bitstream generation unit 104 andthe operation of the bitstream analysis unit 201 are also different.

First, an explanation is given of the configuration of the mergingmotion information candidate list construction unit 140. FIG. 31 is adiagram explaining the configuration of the merging motion informationcandidate list construction unit 140 according to the fifth embodiment.From the merging motion information candidate list construction unit 140according to the first embodiment shown in FIG. 10, the addition of acandidate block setting unit 165 in a stage preceding a spatial mergingmotion information candidate generation unit 160 is different. In thiscase, whether candidate block placement giving priority to theprediction efficiency is used or candidate block placement givingpriority to the processing efficiency such as parallel processing orreduction in processing time is used is switched by a flag or the like.

An explanation is now given of the operation of the merging motioninformation candidate list construction unit 140. FIG. 32 is a flowchartexplaining the operation of the merging motion information candidatelist construction unit 140 according to the fifth embodiment. Additionof step S106 through step S108 in a stage preceding step S100 isdifferent from the operation of the merging motion information candidatelist construction unit 140 according to the first embodiment. Anexplanation is given regarding the step S106 through the step S108.First, the merging motion information candidate list construction unit140 determines whether cu_dependent_flag is 1 (S106). Ifcu_dependent_flag is 1 (Y in S106), the merging motion informationcandidate list construction unit 140 employs the block placement givingpriority to the prediction efficiency (S107). The block placement givingpriority to the prediction efficiency is, for example, block placementconsisting of only candidate blocks neighboring a target predictionblock such as the one shown in FIG. 12 where a positional relationshipthat is the same as that of a prediction block having a prediction blocksize type of 2N.times.2N is applied in a candidate block group of aprediction block having a prediction block size type other than2N.times.2N. If cu_dependent_flag is 0 (N in S106), the merging motioninformation candidate list construction unit 140 employs the blockplacement giving priority to the processing efficiency (S108). The blockplacement giving priority to the processing efficiency is, for example,block placement including candidate blocks that do not neighbor thetarget prediction block such as those shown in FIGS. 14A-14H, FIGS.23A-23H, FIGS. 24A-24H, FIGS. 25A-25H, and FIGS. 28A-28H. Following thestep S107 and the step S108, processes in and after step S100 areperformed. In this case, in the present embodiment, for example, basedon the block placement giving priority to the prediction efficiency suchas the one shown in FIG. 12, the determination of a candidate blockgroup and the construction of a merging motion information candidatelist are performed for each prediction block of a coding block based onthe position and size thereof. Alternatively, for example, based on theblock placement giving priority to the processing efficiency such as theone shown in FIGS. 25A-25H, whether or not to construct a merging motioninformation candidate list from a candidate block shared in allprediction blocks of a coding block is switched.

In the moving picture coding device 100, whether enable_cu_parallel_flagis 0 or 1 is set at a level higher than the moving picture coding device100. In this case, the operation shown in FIG. 32 is performed by themerging motion information candidate list construction unit 140.However, the operation may be set at a level higher than the movingpicture coding device 100.

The bitstream generation unit 104 multiplexes cu_dependent_flag at aposition other than that of a coding block such as the position of aSPS, a PPS, a slice header, or the like. The bitstream analysis unit 201decodes cu_dependent_flag multiplexed at a position other than that of acoding block such as the position of a SPS, a PPS, a slice header, orthe like and supplies the decoded cu_dependent_flag to the motioninformation reproduction unit 204.

By multiplexing cu_dependent_flag in a bitstream, whether the bitstreamis a bitstream giving priority to the prediction efficiency can beeasily determined. Also, a bitstream by block placement giving priorityto the prediction efficiency and a bitstream by block placement givingpriority to the processing efficiency can be decoded in a commondecoding device. For a decoding device that decodes onlycu_dependent_flag of 0 or 1, a bitstream can be correctly decoded by,for example, generating a bitstream while fixing cu_dependent_flag to beeither 0 or 1 by application regulations, a profile that classifiescoding tools such as MPEG-4AVC, or the like and ignoringcu_dependent_flag or setting cu_dependent_flag implicitly. Also, bymultiplexing cu_dependent_flag to a header higher than the coding block,the operation shown in FIG. 32 can be reduced.

In this case, the block placement giving priority to the predictionefficiency and the block placement giving priority to the processingefficiency are switched by cu_dependent_flag. However, for example, thefollowing can be also possible. The block placement giving priority tothe processing efficiency is used when the number of partitionoccurrences is larger than or equal to a predetermined number of times.The block placement giving priority to the prediction efficiency is usedwhen the coding block is not larger than or equal to a predeterminedthreshold size. The block placement giving priority to the processingefficiency is used when the coding block is smaller than or equal to thepredetermined threshold size. The block placement giving priority to theprediction efficiency is used when the coding block is not smaller thanor equal to the predetermined threshold size. Also, setting thepredetermined threshold size to be 8.times.8, which is the minimumcoding block size, allows for the application only when throughput isincreased the most, and the throughput and the prediction efficiency canthus be balanced in an optimal way. In this case, whether the codingblock is the predetermined threshold size is determined in the stepS108. By using the block placement giving priority to the processingefficiency when the number of partition occurrences of the coding blockis larger than or equal to the predetermined number of times (or smallerthan or equal to the predetermined threshold size) in the coding blockand by using the block placement giving priority to the predictionefficiency when the number of partition occurrences of the coding blockis not larger than or equal to the predetermined number of times (orsmaller than or equal to the predetermined threshold size) in the codingblock, the prediction efficiency and the throughput can be easilyadjusted. The predetermined threshold size and the predetermined numberof times can be also multiplexed at a position other than that of thecoding block such as the position of a SPS, a PPS, a slice header, orthe like. By using enable_cu_parallel_flag meaning that thepredetermined threshold size or the predetermined number of times isdefined when enable_cu_parallel_flag is 1 and the predeterminedthreshold size or the predetermined number of times is not defined whenenable_cu_parallel_flag is 0 so as to perform multiplexing in abitstream, the throughput and the prediction efficiency can be adjustedmore flexibly. In other words, the block placement giving priority tothe prediction efficiency is always used regardless of the predeterminedthreshold size or the predetermined number of times by settingenable_cu_parallel_flag to be 0, and the throughput and the predictionefficiency can be balanced by switching the prediction efficiency andthe processing efficiency according to the predetermined threshold sizeor the predetermined number of times by setting enable_cu_parallel_flagto be 1.

Sixth Embodiment

An explanation is given in the following regarding a sixth embodiment. Adetailed explanation is given regarding the configuration of the vectorpredictor mode determination unit 120 and the operation of the motionvector reproduction unit 211 of the moving picture coding device 100according to the third embodiment. An explanation is given in thefollowing regarding the detailed configuration of the vector predictormode determination unit 120.

(Configuration of Vector Predictor Mode Determination Unit 120)

Subsequently, an explanation is given regarding the detailedconfiguration of the vector predictor mode determination unit 120. FIG.33 shows the configuration of the vector predictor mode determinationunit 120. The vector predictor mode determination unit 120 includes avector predictor candidate list construction unit 130 and a vectorpredictor determination unit 131. A terminal 17 is connected to theprediction coding mode determination unit 122.

The vector predictor candidate list construction unit 130 is alsoprovided in the same way in the motion vector reproduction unit 211inside the moving picture decoding device 200 that decodes a bitstreamgenerated by a moving picture coding device 100 according to the sixthembodiment, and an identical vector predictor candidate list isconstructed each in the moving picture coding device 100 and the movingpicture decoding device 200.

(Operation of Vector Predictor Mode Determination Unit 120)

An explanation is given in the following regarding the operation of thevector predictor mode determination unit 120.

First, the following processes are performed for the L0 prediction. Inthe following, x represents 0. The vector predictor candidate listconstruction unit 130 derives a reference index of LX predictionsupplied by the terminal 13. The vector predictor candidate listconstruction unit 130 constructs a vector predictor candidate list ofthe LX prediction including vector predictor candidates of the maximumnumber of vector predictor candidates from the candidate block groupsupplied by the terminal 12 and the reference index of the LXprediction. The vector predictor candidate list construction unit 130supplies the vector predictor candidate list of the LX prediction to thevector predictor determination unit 131.

The vector predictor determination unit 131 selects one vector predictorcandidate from the vector predictor candidate list of the LX predictionsupplied by the vector predictor candidate list construction unit 130and determines a vector predictor index of the LX prediction.

The vector predictor determination unit 131 calculates a vectordifference of the LX prediction by subtracting the vector predictor ofthe LX prediction from the motion vector of the LX prediction suppliedby the terminal 13 and outputs the vector difference of the LXprediction and the vector predictor index of the LX prediction.

The vector predictor determination unit 131 calculates a predictionerror amount from the picture signal supplied by the terminal 15 andfrom a prediction signal of the LX prediction obtained by performingmotion compensation prediction on the reference picture supplied by theterminal 14 based on the motion vector of the LX prediction and thereference index of the LX prediction supplied by the terminal 13, andcalculates a rate distortion evaluation value of Pred_LX from theprediction error amount and from the coding amount of the vectordifference of the LX prediction, the reference index of the LXprediction, and the vector predictor index of the LX prediction.

Then, a process that is the same as that for the L0 prediction isperformed for the L1 prediction while setting X to be 1.

Subsequently, the vector predictor determination unit 131 calculates aprediction error amount from the picture signal supplied by the terminal15 and from a prediction signal of the BI prediction obtained byaveraging the prediction signal of the L0 prediction and the predictionsignal of the L1 prediction, and calculates a rate distortion evaluationvalue of Pred_BI from the prediction error amount and from the codingamount of the respective vector differences of the L0 prediction and theL1 prediction, the respective reference indices of the L0 prediction andthe L1 prediction, and the vector predictor indices of the L0 predictionand the L1 prediction.

The vector predictor determination unit 131 compares the rate distortionevaluation value of Pred_L0, the rate distortion evaluation value ofPred_L1, and the rate distortion evaluation value of Pred_BI and selectsone prediction coding mode with the smallest rate distortion evaluationvalue. The vector predictor determination unit 131 then supplies motioninformation, the vector differences, the vector predictor indices, andthe rate distortion evaluation value based on the prediction coding modeto the prediction coding mode determination unit 122. If the predictioncoding mode is Pred_L0, the motion vector of the L1 prediction becomes(0,0), and the reference index of the L1 prediction becomes “−1”. If theprediction coding mode is Pred_L1, the motion vector of the L0prediction becomes (0,0), and the reference index of the L0 predictionbecomes “−1”.

(Configuration of Vector Predictor Candidate List Construction Unit 130)

An explanation is then given of the detailed configuration of the vectorpredictor candidate list construction unit 130. FIG. 34 is a diagram forexplaining the configuration of the vector predictor candidate listconstruction unit 130. A terminal 18 is connected to the vectorpredictor determination unit 131. The vector predictor candidate listconstruction unit 130 includes a spatial vector predictor candidategeneration unit 150, a temporal vector predictor candidate generationunit 151, a redundant vector predictor candidate deletion unit 152, anda vector predictor candidate supplying unit 153.

(Operation of Vector Predictor Candidate List Construction Unit 130)

An explanation is given in the following regarding the function andoperation of each component. The vector predictor candidate listconstruction unit 130 constructs a vector predictor candidate list ofthe L0 prediction and a vector predictor candidate list of the L1prediction, as necessary. An explanation is given in the following usingLX prediction. X is 0 or 1. FIG. 35 is a flowchart for explaining theoperation of the vector predictor candidate list construction unit 130.

First, the vector predictor candidate list construction unit 130initializes a vector predictor candidate list of the LX prediction(S200). There is no vector predictor candidate in the initialized vectorpredictor candidate list of the LX prediction.

The vector predictor candidate list construction unit 130 separatescandidate blocks included in the spatial candidate block group suppliedby the terminal 12 into two groups: a block E and a block A forming afirst group; and a block C, a block B, and a block D forming a secondgroup, and repeats the following processes in order of the first groupand the second group (S201 through S203).

In this case, regarding the candidate block group supplied by theterminal 12, the same candidate block group as in the merge mode is usedfor a candidate block group of 2N.times.2N, and a candidate block groupin which a positional relationship that is the same as that of2N.times.2N is applied is used for a candidate block group of other than2N.times.2N. As explanation is given on the assumption that thereference index of the LX prediction supplied by the terminal 13, thecandidate block group supplied by the terminal 12, and the vectorpredictor candidate list of the LX prediction are shared inside thevector predictor candidate list construction unit 130.

The spatial vector predictor candidate generation unit 150 generateszero or one spatial vector predictor candidate of the LX prediction fromthe candidate block group of an i-th group (i is 1 or 2), adds thespatial vector predictor candidate of the LX prediction to the vectorpredictor candidate list of the LX prediction (S202), and supplies thevector predictor candidate list of the LX prediction and the candidateblock group to the temporal vector predictor candidate generation unit151.

An explanation is now given regarding a specific method of deriving thespatial vector predictor candidate. The following processes are repeatedfor the first group and the second group. The spatial vector predictorcandidate generation unit 150 checks the block E and the block A inorder as candidate blocks in the first group and checks the block C, theblock B, and the block D in order as candidate blocks in the secondgroup.

The following processes are performed for each candidate block in orderof the L0 prediction and the L1 prediction. Hereinafter, an explanationis given regarding the L0 prediction and the L1 prediction as LNprediction.

The spatial vector predictor candidate generation unit 150 checkswhether a reference picture indicated by a reference index of LNprediction of the candidate block is the same as a reference pictureindicated by the reference index of the LX prediction supplied by theterminal 13.

If the reference picture indicated by the reference index of the LNprediction of the candidate block is the same as the reference pictureindicated by the reference index of the LX prediction supplied by theterminal 13, the spatial vector predictor candidate generation unit 150ends the process regarding a motion vector of the LN prediction of thecandidate block as the spatial vector predictor candidate.

If the reference picture indicated by the reference index of the LNprediction of the candidate block is not the same as the referencepicture indicated by the reference index of the LX prediction suppliedby the terminal 13, the spatial vector predictor candidate generationunit 150 checks subsequent LN prediction or a subsequent candidateblock.

The spatial vector predictor candidate generation unit 150 ends theprocess when checking is completed for all candidate blocks.

As described above, zero or one spatial vector predictor candidate isderived from each of the groups, and zero to two spatial vectorpredictor candidates are derived for the LX prediction.

Subsequently, the temporal vector predictor candidate generation unit151 generates zero or one temporal vector predictor candidate of the LXprediction from the temporal candidate block group, adds the temporalvector predictor candidate of the LX prediction to the vector predictorcandidate list of the LX prediction (S204), and supplies the vectorpredictor candidate list of the LX prediction and the candidate blockgroup to the vector predictor candidate supplying unit 153.

An explanation is now given regarding a specific method of deriving thetemporal vector predictor candidate. The temporal vector predictorcandidate generation unit 151 checks in order of the block H and theblock I regarding the temporal candidate block group as candidateblocks. The following processes are performed for each candidate blockin order of the L0 prediction and the L1 prediction. Hereinafter, anexplanation is given regarding the L0 prediction and the L1 predictionas LN prediction. The temporal vector predictor candidate generationunit 151 checks whether LN prediction of the candidate block is valid.LN prediction of the candidate block being valid means that thereference index thereof is larger than or equal to O. If the LNprediction of the candidate block is valid, the temporal vectorpredictor candidate generation unit 151 derives the temporal vectorpredictor candidate using a motion vector of the LN prediction of thecandidate block as a reference motion vector and ends the process. Adescription of the method of deriving the temporal vector predictorcandidate will be described later. If the LN prediction of the candidateblock is not valid, the temporal vector predictor candidate generationunit 151 checks a subsequent candidate block. The spatial vectorpredictor candidate generation unit 150 ends the process when checkingis completed for all candidate blocks.

An explanation is now given regarding a method of deriving the temporalvector predictor candidate. Using an inter-picture distance between aColPic having a temporal candidate block and a ColRefLXPic, which is apicture referred to by the temporal candidate block in motioncompensation prediction of the LN prediction, an inter-picture distancebetween a reference image RefLXPic indicated by the reference index ofthe LX prediction and a target picture CurPic, and the reference motionvector of the LX prediction as td, tb, and mvLX, respectively, atemporal vector predictor candidate mvLXCol is calculated by Expression1.

The redundant vector predictor candidate deletion unit 152 checks vectorpredictor candidates added to the vector predictor candidate list of theLX prediction supplied by the temporal vector predictor candidategeneration unit 151, leaves, when there are a plurality of vectorpredictor candidates having an identical vector, one vector predictorcandidate and deletes the rest of the vector predictor candidates,deletes, when the number of the vector predictor candidates added to thevector predictor candidate list of the LX prediction exceeds the maximumnumber of vector predictor candidates, vector predictor candidates inthe last part of the vector predictor candidate list of the LXprediction such that the number of the vector predictor candidates addedto the vector predictor candidate list of the LX prediction becomessmaller than or equal to the maximum number of vector predictorcandidates (S205), supplies the vector predictor candidate list of theLX prediction to the vector predictor candidate supplying unit 153.Merging motion information candidates added to the vector predictorcandidate list of the LX prediction are all different merging motioninformation candidates at this time.

The vector predictor candidate supplying unit 153 generates vectorpredictor supplying candidates, adds the vector predictor supplyingcandidates such that the number of the vector predictor candidates addedto the vector predictor candidate list of the LX prediction supplied bythe redundant vector predictor candidate deletion unit 152 becomes themaximum number of vector predictor candidates (S206), and supplies thevector predictor supplying candidates to the terminal 18. It is assumedthat the vector predictor supplying candidates have a motion vector(0,0). In this case, the vector predictor supplying candidates are setto have a motion vector (0,0). However, the vector predictor supplyingcandidates may have a predetermined value such as (1,1) or have a motionvector where a horizontal component or a vertical component of a spatialvector predictor candidate is set to be +1 or −1.

In this case, the candidate blocks included in the spatial candidateblock group supplied by the terminal 12 are separated into two groups sothat one spatial motion vector predictor candidate can be selected eachfrom each of the groups. However, the candidate blocks may be put in onegroup, and two spatial motion vector predictor candidates may beselected.

An explanation is given in the following regarding the detailedconfiguration of the motion vector reproduction unit 211.

(Detailed Configuration of Motion Vector Reproduction Unit 211)

Subsequently, an explanation is given regarding the detailedconfiguration of the motion vector reproduction unit 211. FIG. 36 is adiagram explaining the configuration of the motion vector reproductionunit 211. The motion vector reproduction unit 211 includes a vectorpredictor candidate list construction unit 220, a vector predictorselection unit 221, and an addition unit 222. A terminal 35 is connectedto the coding mode decision unit 210.

(Detailed Operation of Motion Vector Reproduction Unit 211)

An explanation is given in the following regarding the function andoperation of each component. The motion vector reproduction unit 211calculates a motion vector for L0 prediction if the inter predictiontype supplied by the terminal 35 is L0 prediction, calculates a motionvector for L1 prediction if the inter prediction type is L1 prediction,and calculates a motion vector for L0 prediction and for L1 predictionif the inter prediction type is BI prediction. The calculation of amotion vector for each LX prediction is as shown in the following.

The motion vector reproduction unit 211 constructs a vector predictorcandidate list of LX prediction from a reference index of the LXprediction supplied by the terminal 35 and a candidate block groupsupplied by the terminal 33. The motion vector reproduction unit 211selects a vector predictor candidate indicated by a vector predictorindex of the LX prediction from the vector predictor list of the LXprediction as a vector predictor of the LX prediction and adds thevector predictor of the LX prediction and a vector difference of the LXprediction so as to calculate a motion vector of the LX prediction.

Motion information is generated by combining the motion vector of the LXprediction and an inter prediction type, and the motion information issupplied to the terminal 34 and the terminal 36.

As described above, in a merge mode where the maximum number of mergecandidates is 5 and where the number of the candidates is relativelyhigh, a merging motion information candidate list is communalized in acoding block by using a candidate block of a prediction block 0 as acandidate block of all prediction blocks in the coding block for acandidate block group of other than 2N.times.2N so as to allow for theparallelization of processes required for candidate selection. In avector predictor mode where the maximum number of vector predictorcandidates is 2 and where the number of the candidates is relativelylow, preferred processing efficiency and prediction efficiency can beachieved by optimizing the prediction efficiency by using a candidateblock, in which a positional relationship of that of 2N.times.2N isapplied, for a candidate block group of other than 2N.times.2N.

The bit stream of moving pictures output from the moving picture codingdevice according to any of the embodiments described above has aspecific data format so that it can be decoded in accordance with thecoding method used in the embodiments. The moving picture decodingdevice compatible with the moving picture coding device is capable ofdecoding the bitstream of the specific data format.

If a wired or wireless network is used to exchange bitstreams betweenthe moving picture coding device and the moving picture decoding device,the bitstream may be converted into a data format suited to the mode oftransmission over a communication channel and be transmittedaccordingly. In this case, there is provided a moving picturetransmitting device for converting the bitstreams output from the movingpicture coding device into coding data of a data format suited to themode of transmission over the communication channel and for transmittingthe bitstreams over the network, and a moving picture receiving devicefor receiving the coding data over the network to recover the bitstreamsand supplying the recovered bitstreams to the moving picture decodingdevice.

The moving picture transmitting device includes a memory for bufferingbitstreams output from the moving picture coding device, a packetprocessing unit for packetizing the bitstreams, and a transmitting unitfor transmitting the packetized coding data over the network. The movingpicture receiving device includes a receiving unit for receiving thepacketized coding data over the network, a memory for buffering thereceived coding data, and a packet processing unit for subjecting thecoding data to a depacketizing process so as to generate bitstreams andproviding the generated bitstreams to the moving picture decodingdevice.

The above-described processes related to coding and decoding can ofcourse be implemented by hardware-based apparatus for transmission,storage, or reception. Alternatively, the processes can be implementedby firmware stored in a read-only memory (ROM), a flash memory, etc., orby software on a computer, etc. The firmware program or the softwareprogram may be made available on, for example, a computer readablerecording medium. Alternatively, the programs may be made available froma server via a wired or wireless network. Still alternatively, theprograms may be made available in the form of data transmission overterrestrial or satellite digital broadcast systems.

Described above is an explanation of the present invention based on theembodiments. These embodiments are intended to be illustrative only, andit will be obvious to those skilled in the art that variousmodifications to constituting elements and processes could be developedand that such modifications are also within the scope of the presentinvention.

[Item 1] A moving picture coding device adapted to code a coding blockconsisting of greater than or equal to one prediction block, comprising:a temporal merging motion information candidate generation unitconfigured to derive, when information indicating whether or not toderive a temporal merging motion information candidate shared for allprediction blocks in the coding block is information indicating thederivation of a temporal merging motion information candidate shared forall the prediction blocks in the coding block, a temporal merging motioninformation candidate shared for all the prediction blocks in the codingblock from a prediction block of a coded picture different from apicture having a prediction block subject to coding; a merging motioninformation candidate generation unit configured to generate a pluralityof merging motion information candidates including the temporal mergingmotion information candidate; a merging motion information selectionunit configured to select one merging motion information candidate fromthe plurality of merging motion information candidates and to use theselected merging motion information candidate as motion information ofthe prediction block subject to coding; and a coding unit configured tocode an index for specifying the selected merging motion informationcandidate as a candidate specifying index.[Item 2] The moving picture coding device according to Item 1, whereinthe temporal merging motion information candidate generation unitderives, when the information indicating whether or not to derive atemporal merging motion information candidate shared for all theprediction blocks in the coding block is not information indicating thederivation of a temporal merging motion information candidate shared forall the prediction blocks in the coding block, the temporal mergingmotion information candidate based on the size and position of theprediction block subject to coding.[Item 3] The moving picture coding device according to Item 1 or 2,wherein the information indicating whether or not to derive a temporalmerging motion information candidate shared for all the predictionblocks in the coding block indicates the derivation of a temporalmerging motion information candidate shared for all the predictionblocks in the coding block when the size of the coding block is smallerthan or equal to a predetermined size.[Item 4] The moving picture coding device according to Item 1 or 2,wherein the information indicating whether or not to derive a temporalmerging motion information candidate shared for all the predictionblocks in the coding block indicates the derivation of a temporalmerging motion information candidate shared for all the predictionblocks in the coding block when the size of the coding block is thepredetermined size.[Item 5] The moving picture coding device according to any one of Items1 through 4, wherein the coding unit codes information indicatingwhether or not to validate the information indicating whether or not toderive a temporal merging motion information candidate shared for allthe prediction blocks in the coding block.[Item 6] The moving picture coding device according to any one of Items1 through 5, wherein the temporal merging motion information candidateshared for all the prediction blocks subject to coding in the codingblock is a temporal merging motion information candidate derived in aprediction block derived first in the coding block.[Item 7] The moving picture coding device according to any one of Items1 through 6, wherein the temporal merging motion information candidategeneration unit derives the temporal merging motion informationcandidate using the coding block as the prediction block subject tocoding.[Item 8] A moving picture coding device adapted to partition a codingblock into a plurality of prediction blocks and perform motioncompensation, comprising: a temporal merging motion informationcandidate generation unit configured to generate a temporal mergingmotion information candidate shared in any one of prediction blocks inthe coding block from a block of a coded picture different from apicture having a prediction block subject to coding; a merging motioninformation candidate generation unit configured to generate a pluralityof merging motion information candidates including the temporal mergingmotion information candidate; a merging motion information selectionunit configured to select one merging motion information candidate fromthe plurality of merging motion information candidates and to set theselected merging motion information candidate to be motion informationof the prediction block subject to coding; and a coding unit configuredto code an index for specifying the selected merging motion informationcandidate as a candidate specifying index.[Item 9] A moving picture coding method for coding a coding blockconsisting of greater than or equal to one prediction block, comprising:deriving, when information indicating whether or not to derive atemporal merging motion information candidate shared for all predictionblocks in the coding block is information indicating the derivation of atemporal merging motion information candidate shared for all theprediction blocks in the coding block, a temporal merging motioninformation candidate shared for all the prediction blocks in the codingblock from a prediction block of a coded picture different from apicture having a prediction block subject to coding; generating aplurality of merging motion information candidates including thetemporal merging motion information candidate; selecting one mergingmotion information candidate from the plurality of merging motioninformation candidates and using the selected merging motion informationcandidate as motion information of the prediction block subject tocoding; and coding an index for specifying the selected merging motioninformation candidate as a candidate specifying index.[Item 10] A moving picture coding program embedded on a non-transitorycomputer-readable recording medium and adapted to code a coding blockconsisting of greater than or equal to one prediction block, comprising:a temporal merging motion information candidate generation moduleconfigured to derive, when information indicating whether or not toderive a temporal merging motion information candidate shared for allprediction blocks in the coding block is information indicating thederivation of a temporal merging motion information candidate shared forall the prediction blocks in the coding block, a temporal merging motioninformation candidate shared for all the prediction blocks in the codingblock from a prediction block of a coded picture different from apicture having a prediction block subject to coding; a merging motioninformation candidate generation module configured to generate aplurality of merging motion information candidates including thetemporal merging motion information candidate; a merging motioninformation selection module configured to select one merging motioninformation candidate from the plurality of merging motion informationcandidates and to use the selected merging motion information candidateas motion information of the prediction block subject to coding; and acoding module configured to code an index for specifying the selectedmerging motion information candidate as a candidate specifying index.[Item 11] A moving picture decoding device adapted to decode a decodingblock consisting of greater than or equal to one prediction block,comprising: a decoding unit configured to decode, from a bit stream inwhich an index for specifying a merging motion information candidateused in a prediction block subject to decoding is coded as a candidatespecifying index, the candidate specifying index; a temporal mergingmotion information candidate generation unit configured to derive, wheninformation indicating whether or not to derive a temporal mergingmotion information candidate shared for all prediction blocks in thedecoding block is information indicating the derivation of a temporalmerging motion information candidate shared for all the predictionblocks in the decoding block, a temporal merging motion informationcandidate shared for all the prediction blocks in the decoding blockfrom a prediction block of a decoded picture different from a picturehaving a prediction block subject to decoding; a merging motioninformation candidate generation unit configured to generate a pluralityof merging motion information candidates including the temporal mergingmotion information candidate; and a merging motion information selectionunit configured to select one merging motion information candidate fromthe plurality of merging motion information candidates based on thecandidate specifying index and to use the selected merging motioninformation candidate as motion information of the prediction blocksubject to decoding.[Item 12] The moving picture decoding device according to Item 11,wherein the temporal merging motion information candidate generationunit derives, when the information indicating whether or not to derive atemporal merging motion information candidate shared for all theprediction blocks in the decoding block is not information indicatingthe derivation of a temporal merging motion information candidate sharedfor all the prediction blocks in the decoding block, the temporalmerging motion information candidate based on the size and position ofthe prediction block subject to decoding.[Item 13] The moving picture decoding device according to Item 11 or 12,wherein the information indicating whether or not to derive a temporalmerging motion information candidate shared for all the predictionblocks in the decoding block indicates the derivation of a temporalmerging motion information candidate shared for all the predictionblocks in the decoding block when the size of the decoding block issmaller than or equal to a predetermined size.[Item 14] The moving picture decoding device according to Item 11 or 12,wherein the information indicating whether or not to derive a temporalmerging motion information candidate shared for all the predictionblocks in the decoding block indicates the derivation of a temporalmerging motion information candidate shared for all the predictionblocks in the decoding block when the size of the decoding block is apredetermined size.[Item 15] The moving picture decoding device according to any one ofItems 11 through 14, wherein the decoding unit decodes, from thebitstream, information indicating whether or not to validate theinformation indicating whether or not to derive a temporal mergingmotion information candidate shared for all the prediction blocks in thedecoding block.[Item 16] The moving picture decoding device according to any one ofItems 11 through 15, wherein the temporal merging motion informationcandidate shared for all the prediction blocks subject to decoding inthe decoding block is a temporal merging motion information candidatederived in a prediction block derived first in the decoding block.[Item 17] The moving picture decoding device according to any one ofItems 11 through 16, wherein the temporal merging motion informationcandidate generation unit derives the temporal merging motioninformation candidate using the decoding block as the prediction blocksubject to decoding.[Item 18] A moving picture decoding device adapted to partition adecoding block into a plurality of prediction blocks and perform motioncompensation, comprising: a decoding unit configured to decode, from abitstream in which an index for specifying a merging motion informationcandidate used in a prediction block subject to decoding is coded as acandidate specifying index, the candidate specifying index; a temporalmerging motion information candidate generation unit configured togenerate a temporal merging motion information candidate shared in anyone of prediction blocks in the coding block from a block of a decodedpicture different from a picture having a prediction block subject todecoding; a merging motion information candidate generation unitconfigured to generate a plurality of merging motion informationcandidates including the temporal merging motion information candidate;and a merging motion information selection unit configured to select onemerging motion information candidate from the plurality of mergingmotion information candidates based on the candidate specifying indexand to set the selected merging motion information candidate to bemotion information of the prediction block subject to decoding.[Item 19] A moving picture decoding method for decoding a decoding blockconsisting of greater than or equal to one prediction block, comprising:decoding, from a bitstream in which an index for specifying a mergingmotion information candidate used in a prediction block subject todecoding is coded as a candidate specifying index, the candidatespecifying index; deriving, when information indicating whether or notto derive a temporal merging motion information candidate shared for allprediction blocks in the decoding block is information indicating thederivation of a temporal merging motion information candidate shared forall the prediction blocks in the decoding block, a temporal mergingmotion information candidate shared for all the prediction blocks in thedecoding block from a prediction block of a decoded picture differentfrom a picture having a prediction block subject to decoding; generatinga plurality of merging motion information candidates including thetemporal merging motion information candidate; and selecting one mergingmotion information candidate from the plurality of merging motioninformation candidates based on the candidate specifying index and usingthe selected merging motion information candidate as motion informationof the prediction block subject to decoding.[Item 20] A moving picture decoding program embedded on a non-transitorycomputer-readable recording medium and adapted to decode a decodingblock consisting of greater than or equal to one prediction block,comprising: a decoding module configured to decode, from a bitstream inwhich an index for specifying a merging motion information candidateused in a prediction block subject to decoding is coded as a candidatespecifying index, the candidate specifying index; a temporal mergingmotion information candidate generation module configured to derive,when information indicating whether or not to derive a temporal mergingmotion information candidate shared for all prediction blocks in thedecoding block is information indicating the derivation of a temporalmerging motion information candidate shared for all the predictionblocks in the decoding block, a temporal merging motion informationcandidate shared for all the prediction blocks in the decoding blockfrom a prediction block of a decoded picture different from a picturehaving a prediction block subject to decoding; a merging motioninformation candidate generation module configured to generate aplurality of merging motion information candidates including thetemporal merging motion information candidate; and a merging motioninformation selection module configured to select one merging motioninformation candidate from the plurality of merging motion informationcandidates based on the candidate specifying index and to use theselected merging motion information candidate as motion information ofthe prediction block subject to decoding.

What is claimed is:
 1. A moving picture coding device adapted to code acoding block consisting of greater than or equal to one predictionblock, comprising: a temporal merging motion information candidategeneration unit configured to derive, when a predetermined thresholdsize is defined and the coding block is smaller than or equal to thepredetermined threshold size, a temporal merging motion informationcandidate shared for all the prediction blocks in the coding block froma prediction block of a coded picture different from a picture having aprediction block subject to coding and derive, when the predeterminedthreshold size is not defined or the coding block is larger than thepredetermined threshold size, a temporal merging motion informationcandidate not shared for all the prediction blocks in the coding blockfrom a prediction block of a coded picture different from a picturehaving a prediction block subject to coding; a merging motioninformation candidate generation unit configured to generate a pluralityof merging motion information candidates including the temporal mergingmotion information candidate and zero or more spatial merging motioninformation candidates; a supplementary motion information candidategeneration unit configured to derive any number of supplementary motioninformation candidate that has predefined motion vectors and referenceindexes; a merging motion information selection unit configured toselect one merging motion information candidate from the plurality ofmerging motion information candidates based on a candidate specifyingindex and to use the selected merging motion information candidate asmotion information of the prediction block subject to coding; and acoding unit configured to code the candidate specifying index andinformation for indicating whether or not to define the predeterminedthreshold size, wherein the predefined motion vectors are (0,0), andwherein the size of the coding block is one of a plurality of sizes of aminimum size to a maximum size, and the size of the coding block isvariable in a picture.
 2. A moving picture coding method for coding acoding block consisting of greater than or equal to one predictionblock, comprising: deriving, when a predetermined threshold size isdefined and the coding block is smaller than or equal to thepredetermined threshold size, a temporal merging motion informationcandidate shared for all the prediction blocks in the coding block froma prediction block of a coded picture different from a picture having aprediction block subject to coding and derive, when the predeterminedthreshold size is not defined or the coding block is larger than thepredetermined threshold size, a temporal merging motion informationcandidate not shared for all the prediction blocks in the coding blockfrom a prediction block of a coded picture different from a picturehaving a prediction block subject to coding; generating a plurality ofmerging motion information candidates including the temporal mergingmotion information candidate and zero or more spatial merging motioninformation candidates; deriving any number of supplementary motioninformation candidate that has predefined motion vectors and referenceindexes; selecting one merging motion information candidate from theplurality of merging motion information candidates based on a candidatespecifying index and to use the selected merging motion informationcandidate as motion information of the prediction block subject tocoding; and coding the candidate specifying index and information forindicating whether or not to define the predetermined threshold size,wherein the predefined motion vectors are (0,0), and wherein the size ofthe coding block is one of a plurality of sizes of a minimum size to amaximum size, and the size of the coding block is variable in a picture.3. A moving picture decoding device adapted to decode a decoding blockconsisting of greater than or equal to one prediction block, comprising:a decoding unit configured to decode an index specifying a candidate andinformation for indicating whether or not to define a predeterminedthreshold size; a temporal merging motion information candidategeneration unit configured to derive, when the predetermined thresholdsize is defined and the decoding block is smaller than or equal to thepredetermined threshold size, a temporal merging motion informationcandidate shared for all the prediction blocks in the decoding blockfrom a prediction block of a decoded picture different from a picturehaving a prediction block subject to decoding and derive, when thepredetermined threshold size is not defined or the decoding block islarger than the predetermined threshold size, a temporal merging motioninformation candidate not shared for all the prediction blocks in thedecoding block from a prediction block of a decoded picture differentfrom a picture having a prediction block subject to decoding; a mergingmotion information candidate generation unit configured to generate aplurality of merging motion information candidates including thetemporal merging motion information candidate and zero or more spatialmerging motion information candidates; a supplementary motioninformation candidate generation unit configured to derive any number ofsupplementary motion information candidate that has predefined motionvectors and reference indexes; a merging motion information selectionunit configured to select one merging motion information candidate fromthe plurality of merging motion information candidates based on theindex and to use the selected merging motion information candidate asmotion information of the prediction block subject to decoding, andwherein the predefined motion vectors are (0,0), and wherein the size ofthe decoding block is one of a plurality of sizes of a minimum size to amaximum size, and the size of the decoding block is variable in apicture.
 4. A moving picture decoding method for decoding a decodingblock consisting of greater than or equal to one prediction block,comprising: decoding an index specifying a candidate and information forindicating whether or not to define a predetermined threshold size;deriving, when the predetermined threshold size is defined and thedecoding block is smaller than or equal to the predetermined thresholdsize, a temporal merging motion information candidate shared for all theprediction blocks in the decoding block from a prediction block of adecoded picture different from a picture having a prediction blocksubject to decoding and derive, when the predetermined threshold size isnot defined or the decoding block is larger than the predeterminedthreshold size, a temporal merging motion information candidate notshared for all the prediction blocks in the decoding block from aprediction block of a decoded picture different from a picture having aprediction block subject to decoding; generating a plurality of mergingmotion information candidates including the temporal merging motioninformation candidate and zero or more spatial merging motioninformation candidates; deriving any number of supplementary motioninformation candidate that has predefined motion vectors and referenceindexes; selecting one merging motion information candidate from theplurality of merging motion information candidates based on the indexand to use the selected merging motion information candidate as motioninformation of the prediction block subject to decoding, and wherein thepredefined motion vectors are (0,0), and wherein the size of thedecoding block is one of a plurality of sizes of a minimum size to amaximum size, and the size of the decoding block is variable in apicture.